Struct mas_matrix_synapse::SynapseConnection
source · pub struct SynapseConnection { /* private fields */ }
Implementations§
source§impl SynapseConnection
impl SynapseConnection
pub fn new( homeserver: String, endpoint: Url, access_token: String, http_client_factory: HttpClientFactory, ) -> Self
pub fn post(&self, url: &str) -> Builder
pub fn get(&self, url: &str) -> Builder
pub fn put(&self, url: &str) -> Builder
pub fn delete(&self, url: &str) -> Builder
Trait Implementations§
source§impl Clone for SynapseConnection
impl Clone for SynapseConnection
source§fn clone(&self) -> SynapseConnection
fn clone(&self) -> SynapseConnection
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl HomeserverConnection for SynapseConnection
impl HomeserverConnection for SynapseConnection
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 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 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 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<(), 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<(), 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 SynapseConnection
impl !RefUnwindSafe for SynapseConnection
impl Send for SynapseConnection
impl Sync for SynapseConnection
impl Unpin for SynapseConnection
impl !UnwindSafe for SynapseConnection
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> Filterable for T
impl<T> Filterable for T
source§fn filterable(
self,
filter_name: &'static str,
) -> RequestFilterDataProvider<T, fn(_: DataRequest<'_>) -> bool>
fn filterable( self, filter_name: &'static str, ) -> RequestFilterDataProvider<T, fn(_: DataRequest<'_>) -> bool>
Creates a filterable data provider with the given name for debugging. Read more
source§impl<T> FutureExt for T
impl<T> FutureExt for T
source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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