pub struct SynchronousMatrixClient { /* private fields */ }Implementations§
Source§impl SynchronousMatrixClient
impl SynchronousMatrixClient
pub fn new(inner: MatrixClient) -> Result<Self>
pub fn sync_once(&self, since: Option<&str>) -> Result<Vec<RoomEvent>>
pub fn start_sync(&self, handler: Arc<dyn SyncEventHandler>) -> Result<()>
pub fn send_message(&self, room_id: &str, body: &str) -> Result<String>
pub fn send_text(&self, room_id: &str, body: &str) -> Result<String>
pub fn send_notice(&self, room_id: &str, body: &str) -> Result<String>
pub fn send_event( &self, room_id: &str, event_type: &str, content: &Value, ) -> Result<String>
pub fn send_state_event( &self, room_id: &str, event_type: &str, state_key: &str, content: &Value, ) -> Result<String>
pub fn redact_event( &self, room_id: &str, event_id: &str, reason: Option<&str>, ) -> Result<String>
pub fn join_room(&self, room_id_or_alias: &str) -> Result<String>
pub fn leave_room(&self, room_id: &str, reason: Option<&str>) -> Result<()>
pub fn invite_user(&self, user_id: &str, room_id: &str) -> Result<()>
pub fn kick_user( &self, user_id: &str, room_id: &str, reason: Option<&str>, ) -> Result<()>
pub fn ban_user( &self, user_id: &str, room_id: &str, reason: Option<&str>, ) -> Result<()>
pub fn unban_user(&self, user_id: &str, room_id: &str) -> Result<()>
pub fn get_joined_rooms(&self) -> Result<Vec<String>>
pub fn get_joined_room_members(&self, room_id: &str) -> Result<Vec<String>>
pub fn get_room_state(&self, room_id: &str) -> Result<Vec<Value>>
pub fn get_room_state_event( &self, room_id: &str, event_type: &str, state_key: &str, ) -> Result<Value>
pub fn get_user_id(&self) -> Result<String>
pub fn profile(&self, user_id: &str) -> Result<MatrixProfile>
pub fn set_display_name(&self, display_name: &str) -> Result<()>
pub fn set_avatar_url(&self, avatar_url: &str) -> Result<()>
pub fn get_presence_status(&self, user_id: &str) -> Result<Presence>
pub fn set_presence_status( &self, status: Presence, status_msg: Option<&str>, ) -> Result<()>
pub fn create_room(&self, options: &CreateRoom) -> Result<String>
pub fn create_room_alias(&self, alias: &str, room_id: &str) -> Result<()>
pub fn delete_room_alias(&self, alias: &str) -> Result<()>
pub fn lookup_room_alias( &self, alias: &str, ) -> Result<RoomDirectoryLookupResponse>
pub fn set_account_data(&self, event_type: &str, content: &Value) -> Result<()>
pub fn get_account_data(&self, event_type: &str) -> Result<Value>
pub fn upload_media( &self, bytes: Vec<u8>, content_type: &str, filename: Option<&str>, ) -> Result<MXCUrl>
pub fn download_media(&self, mxc: &MXCUrl) -> Result<Vec<u8>>
pub fn mxc_to_http( &self, mxc: &str, width: Option<u32>, height: Option<u32>, ) -> Option<String>
pub fn get_event(&self, room_id: &str, event_id: &str) -> Result<Value>
pub fn get_server_versions(&self) -> Result<Value>
pub fn get_capabilities(&self) -> Result<Value>
Auto Trait Implementations§
impl !Freeze for SynchronousMatrixClient
impl !RefUnwindSafe for SynchronousMatrixClient
impl Send for SynchronousMatrixClient
impl Sync for SynchronousMatrixClient
impl Unpin for SynchronousMatrixClient
impl UnsafeUnpin for SynchronousMatrixClient
impl !UnwindSafe for SynchronousMatrixClient
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