rust

package
v0.0.0-...-71aaf32 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 5, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CrossProcessStoreLocksHolderName = "CrossProcessStoreLocksHolderName"
)
View Source
const ProcessNameNSE string = "NSE"

magic value for EnableCrossProcessRefreshLockProcessName which configures the FFI client according to iOS NSE.

Variables

This section is empty.

Functions

func DeleteOldLogs

func DeleteOldLogs(prefix string)

func NewRustClient

func NewRustClient(t ct.TestLike, opts api.ClientCreationOpts) (api.Client, error)

func SetupLogs

func SetupLogs(prefix string)

Types

type DynamicSlice

type DynamicSlice[T any] struct {
	Slice []T
}

This is a recurring pattern in the FFI bindings where a room list or timeline has delta updates sent to it. Rather than reimplementing all the functions over and over, define it once here.

func (*DynamicSlice[T]) Append

func (s *DynamicSlice[T]) Append(vals ...T)

Append items to the end of the slice.

func (*DynamicSlice[T]) Clear

func (s *DynamicSlice[T]) Clear()

func (*DynamicSlice[T]) Insert

func (s *DynamicSlice[T]) Insert(i int, val T)

Insert the item, shifting anything in this place up by one.

func (*DynamicSlice[T]) PopBack

func (s *DynamicSlice[T]) PopBack()

func (*DynamicSlice[T]) PopFront

func (s *DynamicSlice[T]) PopFront()

func (*DynamicSlice[T]) PushBack

func (s *DynamicSlice[T]) PushBack(val T)

func (*DynamicSlice[T]) PushFront

func (s *DynamicSlice[T]) PushFront(val T)

func (*DynamicSlice[T]) Remove

func (s *DynamicSlice[T]) Remove(i int)

Remove the item, shifting anything above this down by one.

func (*DynamicSlice[T]) Reset

func (s *DynamicSlice[T]) Reset(vals []T)

func (*DynamicSlice[T]) Set

func (s *DynamicSlice[T]) Set(i int, val T)

Set the item at i to val, does not shift anything.

func (*DynamicSlice[T]) Truncate

func (s *DynamicSlice[T]) Truncate(length int)

type MemoryClientSessionDelegate

type MemoryClientSessionDelegate struct {
	// contains filtered or unexported fields
}

func NewMemoryClientSessionDelegate

func NewMemoryClientSessionDelegate() *MemoryClientSessionDelegate

func (*MemoryClientSessionDelegate) RetrieveSessionFromKeychain

func (d *MemoryClientSessionDelegate) RetrieveSessionFromKeychain(userID string) (matrix_sdk_ffi.Session, error)

func (*MemoryClientSessionDelegate) SaveSessionInKeychain

func (d *MemoryClientSessionDelegate) SaveSessionInKeychain(session matrix_sdk_ffi.Session)

type RoomsListener

type RoomsListener struct {
	// contains filtered or unexported fields
}

This is a more ergonomic way to listen for updates from the FFI layer, as it will allow you to listen for non-existing rooms without crashing.

func NewRoomsListener

func NewRoomsListener() *RoomsListener

func (*RoomsListener) AddListener

func (l *RoomsListener) AddListener(callback func(broadcastRoomID string) (cancel bool)) (cancel func())

AddListener registers the given callback, which will be invoked for every call to BroadcastUpdateForRoom.

func (*RoomsListener) BroadcastUpdateForRoom

func (l *RoomsListener) BroadcastUpdateForRoom(roomID string)

BroadcastUpdateForRoom informs all attached listeners that something has happened in relation to this room ID. This could be a new event, or the room appearing in all_rooms, or something else entirely. It is up to the listener to decide what to do upon receipt of the poke.

type RustClient

type RustClient struct {
	FFIClient *matrix_sdk_ffi.Client
	// contains filtered or unexported fields
}

func (*RustClient) Backpaginate

func (c *RustClient) Backpaginate(t ct.TestLike, roomID string, count int) error

func (*RustClient) BackupKeys

func (c *RustClient) BackupKeys(t ct.TestLike) (recoveryKey string, err error)

func (*RustClient) Close

func (c *RustClient) Close(t ct.TestLike)

func (*RustClient) CurrentAccessToken

func (c *RustClient) CurrentAccessToken(t ct.TestLike) string

func (*RustClient) DeletePersistentStorage

func (c *RustClient) DeletePersistentStorage(t ct.TestLike)

func (*RustClient) ForceClose

func (c *RustClient) ForceClose(t ct.TestLike)

func (*RustClient) GetEvent

func (c *RustClient) GetEvent(t ct.TestLike, roomID, eventID string) (*api.Event, error)

func (*RustClient) GetEventShield

func (c *RustClient) GetEventShield(t ct.TestLike, roomID, eventID string) (*api.EventShield, error)

func (*RustClient) GetNotification

func (c *RustClient) GetNotification(t ct.TestLike, roomID, eventID string) (*api.Notification, error)

func (*RustClient) InviteUser

func (c *RustClient) InviteUser(t ct.TestLike, roomID, userID string) error

func (*RustClient) IsRoomEncrypted

func (c *RustClient) IsRoomEncrypted(t ct.TestLike, roomID string) (bool, error)

IsRoomEncrypted returns true if the room is encrypted. May return an error e.g if you provide a bogus room ID.

func (*RustClient) ListenForVerificationRequests

func (c *RustClient) ListenForVerificationRequests(t ct.TestLike) chan api.VerificationStage

func (*RustClient) LoadBackup

func (c *RustClient) LoadBackup(t ct.TestLike, recoveryKey string) error

func (*RustClient) Logf

func (c *RustClient) Logf(t ct.TestLike, format string, args ...interface{})

func (*RustClient) Login

func (c *RustClient) Login(t ct.TestLike, opts api.ClientCreationOpts) error

func (*RustClient) Opts

func (c *RustClient) Opts() api.ClientCreationOpts

func (*RustClient) RequestOwnUserVerification

func (c *RustClient) RequestOwnUserVerification(t ct.TestLike) chan api.VerificationStage

func (*RustClient) SendMessage

func (c *RustClient) SendMessage(t ct.TestLike, roomID, text string) (eventID string, err error)

func (*RustClient) StartSyncing

func (c *RustClient) StartSyncing(t ct.TestLike) (stopSyncing func(), err error)

StartSyncing to begin syncing from sync v2 / sliding sync. Tests should call stopSyncing() at the end of the test.

func (*RustClient) Type

func (c *RustClient) Type() api.ClientTypeLang

func (*RustClient) UserID

func (c *RustClient) UserID() string

func (*RustClient) WaitUntilEventInRoom

func (c *RustClient) WaitUntilEventInRoom(t ct.TestLike, roomID string, checker func(api.Event) bool) api.Waiter

type RustRoomInfo

type RustRoomInfo struct {
	// contains filtered or unexported fields
}

type SessionVerificationControllerDelegate

type SessionVerificationControllerDelegate struct {
	// contains filtered or unexported fields
}

you call requestDeviceVerification(), then you wait for acceptedVerificationRequest and then you call startSasVerification you should then receivedVerificationData and approveVerification or declineVerification

func (*SessionVerificationControllerDelegate) DidAcceptVerificationRequest

func (s *SessionVerificationControllerDelegate) DidAcceptVerificationRequest()

func (*SessionVerificationControllerDelegate) DidCancel

func (*SessionVerificationControllerDelegate) DidFail

func (*SessionVerificationControllerDelegate) DidFinish

func (*SessionVerificationControllerDelegate) DidReceiveVerificationData

func (*SessionVerificationControllerDelegate) DidReceiveVerificationRequest

func (*SessionVerificationControllerDelegate) DidStartSasVerification

func (s *SessionVerificationControllerDelegate) DidStartSasVerification()

func (*SessionVerificationControllerDelegate) OnUpdate

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL