pub struct ServerBackend { /* private fields */ }Implementations§
Trait Implementations§
Source§impl Backend for ServerBackend
impl Backend for ServerBackend
fn kind(&self) -> BackendKind
fn capabilities(&self) -> Capabilities
Source§fn server_ref(&self) -> &str
fn server_ref(&self) -> &str
The normalized server base URL this backend talks to (the identity is bound to it).
Source§fn ensure_session(
&self,
ids: &IdentityStore,
id: &mut SessionIdentity,
invite: Option<&str>,
) -> Result<Session>
fn ensure_session( &self, ids: &IdentityStore, id: &mut SessionIdentity, invite: Option<&str>, ) -> Result<Session>
A live session for
id. First time: redeems the operator’s invite (enroll the public key,
proving possession of the private one); afterwards: logs in by signing a fresh challenge.
Reuses the stored token while the server still accepts it. Persists what it learns.Source§fn execute(&self, request: &OutgoingRequest) -> Result<HttpResponseDescriptor>
fn execute(&self, request: &OutgoingRequest) -> Result<HttpResponseDescriptor>
Performs one request of the engine as this session (bearer added, token refreshed once by
signature if the server forgot it). Callable from any thread. Needs
ensure_session first.Source§fn wait_for_news(&self, timeout: Duration) -> Result<News>
fn wait_for_news(&self, timeout: Duration) -> Result<News>
Waits up to
timeout for news for this session: room events pushed on the server’s push
socket, or Idle (timeout, or the server has no push channel and the sync long poll is the
wait).Source§fn whoami(&self) -> Result<(String, String)>
fn whoami(&self) -> Result<(String, String)>
(user_id, device_id) of the session (what the engine needs to open a core).Source§fn keep_prefix(&self) -> bool
fn keep_prefix(&self) -> bool
Whether this server serves the Matrix paths under
/_matrix (found out, not assumed).Auto Trait Implementations§
impl !Freeze for ServerBackend
impl !RefUnwindSafe for ServerBackend
impl !UnwindSafe for ServerBackend
impl Send for ServerBackend
impl Sync for ServerBackend
impl Unpin for ServerBackend
impl UnsafeUnpin for ServerBackend
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more