pub struct ReadOnlyHomeserverConnection<C> { /* private fields */ }Expand description
A wrapper around a HomeserverConnection that only allows read
operations.
Implementations§
Source§impl<C> ReadOnlyHomeserverConnection<C>
 
impl<C> ReadOnlyHomeserverConnection<C>
pub fn new(inner: C) -> Selfwhere
    C: HomeserverConnection,
Trait Implementations§
Source§impl<C: HomeserverConnection> HomeserverConnection for ReadOnlyHomeserverConnection<C>
 
impl<C: HomeserverConnection> HomeserverConnection for ReadOnlyHomeserverConnection<C>
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, 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, 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, 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. Read more
Source§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 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,
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<(), 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<(), 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<(), 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<(), 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<(), 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<(), 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<(), 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<(), 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<(), 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<(), 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<(), 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<(), 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<(), 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<(), 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<(), 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<(), 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<C> Freeze for ReadOnlyHomeserverConnection<C>where
    C: Freeze,
impl<C> RefUnwindSafe for ReadOnlyHomeserverConnection<C>where
    C: RefUnwindSafe,
impl<C> Send for ReadOnlyHomeserverConnection<C>where
    C: Send,
impl<C> Sync for ReadOnlyHomeserverConnection<C>where
    C: Sync,
impl<C> Unpin for ReadOnlyHomeserverConnection<C>where
    C: Unpin,
impl<C> UnwindSafe for ReadOnlyHomeserverConnection<C>where
    C: UnwindSafe,
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
Source§impl<T> Instrument for T
 
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
 
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
 
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
 
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
 
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts 
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
 
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts 
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more