Struct mas_matrix::MockHomeserverConnection
source · pub struct MockHomeserverConnection { /* private fields */ }
Expand description
A mock implementation of a HomeserverConnection
, which never fails and
doesn’t do anything.
Implementations§
Trait Implementations§
source§impl HomeserverConnection for HomeserverConnection
impl HomeserverConnection for HomeserverConnection
source§fn homeserver(&self) -> &str
fn homeserver(&self) -> &str
Get the homeserver URL.
source§fn query_user<'life0, 'life1, 'async_trait>(
&'life0 self,
mxid: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<MatrixUser, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn query_user<'life0, 'life1, 'async_trait>(
&'life0 self,
mxid: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<MatrixUser, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Query the state of a user on the homeserver. Read more
source§fn provision_user<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 ProvisionRequest,
) -> Pin<Box<dyn Future<Output = Result<bool, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn provision_user<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 ProvisionRequest,
) -> Pin<Box<dyn Future<Output = Result<bool, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Provision a user on the homeserver. Read more
source§fn is_localpart_available<'life0, 'life1, 'async_trait>(
&'life0 self,
localpart: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<bool, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn is_localpart_available<'life0, 'life1, 'async_trait>(
&'life0 self,
localpart: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<bool, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Check whether a given username is available on the homeserver. Read more
source§fn create_device<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
mxid: &'life1 str,
device_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn create_device<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
mxid: &'life1 str,
device_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Create a device for a user on the homeserver. Read more
source§fn delete_device<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
mxid: &'life1 str,
device_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn delete_device<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
mxid: &'life1 str,
device_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Delete a device for a user on the homeserver. Read more
source§fn sync_devices<'life0, 'life1, 'async_trait>(
&'life0 self,
mxid: &'life1 str,
devices: HashSet<String>,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn sync_devices<'life0, 'life1, 'async_trait>(
&'life0 self,
mxid: &'life1 str,
devices: HashSet<String>,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Sync the list of devices of a user with the homeserver. Read more
source§fn delete_user<'life0, 'life1, 'async_trait>(
&'life0 self,
mxid: &'life1 str,
erase: bool,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete_user<'life0, 'life1, 'async_trait>(
&'life0 self,
mxid: &'life1 str,
erase: bool,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Delete a user on the homeserver. Read more
source§fn reactivate_user<'life0, 'life1, 'async_trait>(
&'life0 self,
mxid: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn reactivate_user<'life0, 'life1, 'async_trait>(
&'life0 self,
mxid: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Reactivate a user on the homeserver. Read more
source§fn set_displayname<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
mxid: &'life1 str,
displayname: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn set_displayname<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
mxid: &'life1 str,
displayname: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Set the displayname of a user on the homeserver. Read more
source§fn unset_displayname<'life0, 'life1, 'async_trait>(
&'life0 self,
mxid: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn unset_displayname<'life0, 'life1, 'async_trait>(
&'life0 self,
mxid: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Unset the displayname of a user on the homeserver. Read more
source§fn allow_cross_signing_reset<'life0, 'life1, 'async_trait>(
&'life0 self,
mxid: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn allow_cross_signing_reset<'life0, 'life1, 'async_trait>(
&'life0 self,
mxid: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Temporarily allow a user to reset their cross-signing keys. Read more
Auto Trait Implementations§
impl !Freeze for HomeserverConnection
impl !RefUnwindSafe for HomeserverConnection
impl Send for HomeserverConnection
impl Sync for HomeserverConnection
impl Unpin for HomeserverConnection
impl !UnwindSafe for HomeserverConnection
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