pub struct SynapseAdminApis { /* private fields */ }Implementations§
Source§impl SynapseAdminApis
impl SynapseAdminApis
pub fn new(client: MatrixClient) -> Self
pub async fn get_user(&self, user_id: &str) -> Result<SynapseUser>
pub async fn upsert_user( &self, user_id: &str, opts: &SynapseUserProperties, ) -> Result<SynapseUser>
pub async fn list_users( &self, from: Option<&str>, limit: Option<u64>, name: Option<&str>, guests: bool, deactivated: bool, ) -> Result<UserListResponse>
pub async fn is_admin(&self, user_id: &str) -> Result<bool>
pub async fn is_self_admin(&self) -> Result<bool>
pub async fn get_room_members(&self, room_id: &str) -> Result<Value>
pub async fn list_rooms( &self, search_term: Option<&str>, from: Option<&str>, limit: Option<u64>, order_by: Option<SynapseRoomProperty>, reverse_order: bool, ) -> Result<RoomListResponse>
pub async fn get_room_state(&self, room_id: &str) -> Result<Value>
pub async fn make_room_admin( &self, room_id: &str, user_id: Option<&str>, ) -> Result<()>
pub async fn get_server_stats(&self) -> Result<ServerStatsResponse>
pub async fn get_room_details(&self, room_id: &str) -> Result<Value>
pub async fn delete_room( &self, room_id: &str, purge: bool, force_purge: bool, block: bool, ) -> Result<String>
pub async fn get_delete_room_status(&self, delete_id: &str) -> Result<Value>
pub async fn get_delete_room_state(&self, room_id: &str) -> Result<Vec<Value>>
pub async fn get_user_media( &self, user_id: &str, limit: Option<u64>, from: Option<&str>, ) -> Result<Value>
pub async fn get_user_joined_rooms(&self, user_id: &str) -> Result<Value>
pub async fn shadow_ban(&self, user_id: &str) -> Result<()>
pub async fn unshadow_ban(&self, user_id: &str) -> Result<()>
pub async fn get_server_version(&self) -> Result<Value>
pub async fn purge_history( &self, room_id: &str, purge_up_to_ts: Option<u64>, delete_local_events: bool, ) -> Result<String>
pub async fn get_purge_status(&self, purge_id: &str) -> Result<Value>
pub async fn list_registration_tokens( &self, valid: Option<bool>, ) -> Result<Vec<SynapseRegistrationToken>>
pub async fn get_registration_token( &self, token: &str, ) -> Result<Option<SynapseRegistrationToken>>
pub async fn create_registration_token( &self, options: &SynapseRegistrationTokenOptions, ) -> Result<SynapseRegistrationToken>
pub async fn update_registration_token( &self, token: &str, options: &SynapseRegistrationTokenUpdateOptions, ) -> Result<SynapseRegistrationToken>
pub async fn delete_registration_token(&self, token: &str) -> Result<()>
pub async fn get_event_nearest_to_timestamp( &self, room_id: &str, ts: u64, dir: &str, ) -> Result<Value>
Trait Implementations§
Source§impl Clone for SynapseAdminApis
impl Clone for SynapseAdminApis
Source§fn clone(&self) -> SynapseAdminApis
fn clone(&self) -> SynapseAdminApis
Returns a duplicate 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 moreAuto Trait Implementations§
impl Freeze for SynapseAdminApis
impl !RefUnwindSafe for SynapseAdminApis
impl Send for SynapseAdminApis
impl Sync for SynapseAdminApis
impl Unpin for SynapseAdminApis
impl UnsafeUnpin for SynapseAdminApis
impl !UnwindSafe for SynapseAdminApis
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