pub struct MatrixBridge { /* private fields */ }Implementations§
Source§impl MatrixBridge
impl MatrixBridge
pub fn new(bot_intent: Intent) -> Self
pub async fn map_virtual_user( &self, namespace: impl Into<String>, user_id: impl Into<String>, ) -> Result<()>
pub async fn resolve_virtual_user(&self, namespace: &str) -> Option<String>
Sourcepub async fn get_remote_user_info<T: DeserializeOwned>(
&self,
user_intent: &Intent,
) -> Result<T>
pub async fn get_remote_user_info<T: DeserializeOwned>( &self, user_intent: &Intent, ) -> Result<T>
Gets information about a remote user.
Sourcepub async fn set_remote_user_info<T: Serialize>(
&self,
user_intent: &Intent,
remote_info: &T,
) -> Result<()>
pub async fn set_remote_user_info<T: Serialize>( &self, user_intent: &Intent, remote_info: &T, ) -> Result<()>
Sets information about a remote user. Calling this function will map the provided remote user ID to the intent’s owner.
Sourcepub async fn get_remote_room_info<T: DeserializeOwned>(
&self,
matrix_room_id: &str,
) -> Result<T>
pub async fn get_remote_room_info<T: DeserializeOwned>( &self, matrix_room_id: &str, ) -> Result<T>
Gets information about a remote room.
Sourcepub async fn set_remote_room_info<T: Serialize>(
&self,
matrix_room_id: &str,
remote_info: &T,
) -> Result<()>
pub async fn set_remote_room_info<T: Serialize>( &self, matrix_room_id: &str, remote_info: &T, ) -> Result<()>
Sets information about a remote room. Calling this function will map the provided remote room ID to the matrix room ID.
Sourcepub async fn get_matrix_room_id_for_remote(
&self,
remote_room_id: &str,
) -> Result<String>
pub async fn get_matrix_room_id_for_remote( &self, remote_room_id: &str, ) -> Result<String>
Gets the Matrix room ID for the provided remote room ID.
Sourcepub async fn get_intent_for_remote(
&self,
remote_user_id: &str,
) -> Result<Intent>
pub async fn get_intent_for_remote( &self, remote_user_id: &str, ) -> Result<Intent>
Gets a Matrix user intent for the provided remote user ID.
Trait Implementations§
Source§impl Clone for MatrixBridge
impl Clone for MatrixBridge
Source§fn clone(&self) -> MatrixBridge
fn clone(&self) -> MatrixBridge
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 MatrixBridge
impl !RefUnwindSafe for MatrixBridge
impl Send for MatrixBridge
impl Sync for MatrixBridge
impl Unpin for MatrixBridge
impl UnsafeUnpin for MatrixBridge
impl !UnwindSafe for MatrixBridge
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