pub trait HomeserverConnection: Send + Sync {
Show 16 methods
    // Required methods
    fn homeserver(&self) -> &str;
    fn verify_token<'life0, 'life1, 'async_trait>(
        &'life0 self,
        token: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn query_user<'life0, 'life1, 'async_trait>(
        &'life0 self,
        localpart: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<MatrixUser, 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, 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, Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn upsert_device<'life0, 'life1, 'life2, 'life3, 'async_trait>(
        &'life0 self,
        localpart: &'life1 str,
        device_id: &'life2 str,
        initial_display_name: Option<&'life3 str>,
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             'life3: 'async_trait;
    fn update_device_display_name<'life0, 'life1, 'life2, 'life3, 'async_trait>(
        &'life0 self,
        localpart: &'life1 str,
        device_id: &'life2 str,
        display_name: &'life3 str,
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             'life3: 'async_trait;
    fn delete_device<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        localpart: &'life1 str,
        device_id: &'life2 str,
    ) -> Pin<Box<dyn Future<Output = Result<(), 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,
        localpart: &'life1 str,
        devices: HashSet<String>,
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn delete_user<'life0, 'life1, 'async_trait>(
        &'life0 self,
        localpart: &'life1 str,
        erase: bool,
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn reactivate_user<'life0, 'life1, 'async_trait>(
        &'life0 self,
        localpart: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn set_displayname<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        localpart: &'life1 str,
        displayname: &'life2 str,
    ) -> Pin<Box<dyn Future<Output = Result<(), 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,
        localpart: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<(), 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,
        localpart: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    // Provided methods
    fn mxid(&self, localpart: &str) -> String { ... }
    fn localpart<'a>(&self, mxid: &'a str) -> Option<&'a str> { ... }
}Required Methods§
Sourcefn homeserver(&self) -> &str
 
fn homeserver(&self) -> &str
Get the homeserver URL.
Sourcefn verify_token<'life0, 'life1, 'async_trait>(
    &'life0 self,
    token: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>where
    Self: 'async_trait,
    'life0: 'async_trait,
    'life1: 'async_trait,
 
fn verify_token<'life0, 'life1, 'async_trait>(
    &'life0 self,
    token: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>where
    Self: 'async_trait,
    'life0: 'async_trait,
    'life1: 'async_trait,
Sourcefn query_user<'life0, 'life1, 'async_trait>(
    &'life0 self,
    localpart: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<MatrixUser, Error>> + Send + 'async_trait>>where
    Self: 'async_trait,
    'life0: 'async_trait,
    'life1: 'async_trait,
 
fn query_user<'life0, 'life1, 'async_trait>(
    &'life0 self,
    localpart: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<MatrixUser, 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, 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, Error>> + Send + 'async_trait>>where
    Self: 'async_trait,
    'life0: 'async_trait,
    'life1: 'async_trait,
Provision a user on the homeserver.
§Parameters
request- aProvisionRequestcontaining the details of the user to provision.
§Errors
Returns an error if the homeserver is unreachable or the user could not be provisioned.
Sourcefn is_localpart_available<'life0, 'life1, 'async_trait>(
    &'life0 self,
    localpart: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<bool, 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, Error>> + Send + 'async_trait>>where
    Self: 'async_trait,
    'life0: 'async_trait,
    'life1: 'async_trait,
Sourcefn upsert_device<'life0, 'life1, 'life2, 'life3, 'async_trait>(
    &'life0 self,
    localpart: &'life1 str,
    device_id: &'life2 str,
    initial_display_name: Option<&'life3 str>,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
    Self: 'async_trait,
    'life0: 'async_trait,
    'life1: 'async_trait,
    'life2: 'async_trait,
    'life3: 'async_trait,
 
fn upsert_device<'life0, 'life1, 'life2, 'life3, 'async_trait>(
    &'life0 self,
    localpart: &'life1 str,
    device_id: &'life2 str,
    initial_display_name: Option<&'life3 str>,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
    Self: 'async_trait,
    'life0: 'async_trait,
    'life1: 'async_trait,
    'life2: 'async_trait,
    'life3: 'async_trait,
Sourcefn update_device_display_name<'life0, 'life1, 'life2, 'life3, 'async_trait>(
    &'life0 self,
    localpart: &'life1 str,
    device_id: &'life2 str,
    display_name: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
    Self: 'async_trait,
    'life0: 'async_trait,
    'life1: 'async_trait,
    'life2: 'async_trait,
    'life3: 'async_trait,
 
fn update_device_display_name<'life0, 'life1, 'life2, 'life3, 'async_trait>(
    &'life0 self,
    localpart: &'life1 str,
    device_id: &'life2 str,
    display_name: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
    Self: 'async_trait,
    'life0: 'async_trait,
    'life1: 'async_trait,
    'life2: 'async_trait,
    'life3: 'async_trait,
Update the display name of a device for a user on the homeserver.
§Parameters
localpart- The localpart of the user to update a device for.device_id- The device ID to update.display_name- The new display name to set
§Errors
Returns an error if the homeserver is unreachable or the device could not be updated.