Trait mas_matrix::HomeserverConnection 
source · pub trait HomeserverConnection: Send + Sync {
    type Error;
Show 13 methods
    // Required methods
    fn homeserver(&self) -> &str;
    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 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 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 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 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 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 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 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 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 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 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;
    // Provided method
    fn mxid(&self, localpart: &str) -> String { ... }
}Required Associated Types§
Required Methods§
sourcefn homeserver(&self) -> &str
 
fn homeserver(&self) -> &str
Get the homeserver URL.
sourcefn 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,
sourcefn 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.
§Parameters
- request- a- ProvisionRequestcontaining the details of the user to provision.
§Errors
Returns an error if the homeserver is unreachable or the user could not be provisioned.