pub struct Agent { /* private fields */ }
Implementations§
Source§impl Agent
impl Agent
pub async fn new( client: TokioXmppClient, default_nick: RoomNick, lang: Vec<String>, disco: DiscoInfoResult, node: String, ) -> Agent
pub async fn disconnect(&self) -> Result<()>
pub async fn send_iq( &self, to: Option<Jid>, data: IqRequest, ) -> Result<IqResponse, IqFailure>
pub async fn send_message(&mut self, message: Message) -> Result<()>
pub async fn send_presence(&self, presence: Presence) -> Result<()>
pub fn misc_receiver( &mut self, ) -> Arc<RwLock<UnboundedReceiver<NonTransactional>>>
pub fn events(&mut self) -> Arc<RwLock<UnboundedReceiver<Event>>>
pub async fn join_room<'a>(&mut self, settings: JoinRoomSettings<'a>)
Sourcepub async fn leave_room<'a>(&mut self, settings: LeaveRoomSettings<'a>)
pub async fn leave_room<'a>(&mut self, settings: LeaveRoomSettings<'a>)
Request to leave a chatroom.
If successful, an Event::RoomLeft event will be produced. This method does not remove the room from bookmarks nor remove the autojoin flag. See muc::room::leave_room for more information.
pub async fn send_stanza(&self, _stanza: Stanza) -> Result<(), Error>
pub async fn send_raw_message<'a>(&mut self, settings: RawMessageSettings<'a>)
pub async fn send_room_message<'a>(&mut self, settings: RoomMessageSettings<'a>)
pub async fn send_room_private_message<'a>( &mut self, settings: RoomPrivateMessageSettings<'a>, )
pub async fn upload_file_with(&mut self, service: &str, path: &Path)
Auto Trait Implementations§
impl Freeze for Agent
impl !RefUnwindSafe for Agent
impl Send for Agent
impl Sync for Agent
impl Unpin for Agent
impl !UnwindSafe for Agent
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