pub struct Intent { /* private fields */ }Implementations§
Source§impl Intent
impl Intent
pub fn new(user_id: impl Into<String>, client: MatrixClient) -> Self
pub fn with_storage(self, storage: Arc<dyn IAppserviceStorageProvider>) -> Self
pub fn user_id(&self) -> &str
pub fn underlying_client(&self) -> &MatrixClient
pub async fn ensure_registered(&self) -> Result<()>
pub async fn ensure_joined(&self, room_id_or_alias: &str) -> Result<String>
pub async fn ensure_registered_and_joined( &self, room_id_or_alias: &str, ) -> Result<String>
pub async fn get_joined_rooms(&self) -> Result<Vec<String>>
pub async fn refresh_joined_rooms(&self) -> Result<Vec<String>>
pub async fn join_room(&self, room_id_or_alias: &str) -> Result<String>
pub async fn leave_room( &self, room_id: &str, reason: Option<&str>, ) -> Result<()>
pub async fn send_text(&self, room_id: &str, body: &str) -> Result<String>
pub async fn send_notice(&self, room_id: &str, body: &str) -> Result<String>
pub async fn send_event( &self, room_id: &str, event_type: &str, content: &Value, ) -> Result<String>
pub async fn send_state_event( &self, room_id: &str, event_type: &str, state_key: &str, content: &Value, ) -> Result<String>
pub async fn send_message(&self, room_id: &str, body: &str) -> Result<String>
pub async fn invite_user(&self, user_id: &str, room_id: &str) -> Result<()>
pub async fn kick_user( &self, user_id: &str, room_id: &str, reason: Option<&str>, ) -> Result<()>
pub async fn ban_user( &self, user_id: &str, room_id: &str, reason: Option<&str>, ) -> Result<()>
pub async fn unban_user(&self, user_id: &str, room_id: &str) -> Result<()>
pub async fn redact_event( &self, room_id: &str, event_id: &str, reason: Option<&str>, ) -> Result<String>
pub async fn get_room_members( &self, room_id: &str, ) -> Result<Vec<MembershipEvent>>
pub async fn enable_encryption(&self, room_id: &str) -> Result<()>
pub fn unstable_apis(&self) -> UnstableIntentApis
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Intent
impl !RefUnwindSafe for Intent
impl Send for Intent
impl Sync for Intent
impl Unpin for Intent
impl UnsafeUnpin for Intent
impl !UnwindSafe for Intent
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