pub struct Session { /* private fields */ }Expand description
A client scoped to a single WhatsApp session.
Obtain via crate::Wi::session.
Implementations§
Source§impl Session
impl Session
pub async fn status(&self) -> Result<SessionStatus, WiError>
pub async fn qr(&self) -> Result<QRCode, WiError>
pub async fn connect(&self) -> Result<(), WiError>
pub async fn disconnect(&self) -> Result<(), WiError>
pub async fn logout(&self) -> Result<(), WiError>
pub async fn pair_phone(&self, phone: &str) -> Result<PairPhoneResult, WiError>
pub async fn send_text( &self, p: SendTextParams, ) -> Result<MessageResponse, WiError>
pub async fn send_image( &self, p: SendImageParams, ) -> Result<MessageResponse, WiError>
pub async fn send_audio( &self, p: SendAudioParams, ) -> Result<MessageResponse, WiError>
pub async fn send_video( &self, p: SendVideoParams, ) -> Result<MessageResponse, WiError>
pub async fn send_document( &self, p: SendDocumentParams, ) -> Result<MessageResponse, WiError>
pub async fn send_location( &self, p: SendLocationParams, ) -> Result<MessageResponse, WiError>
pub async fn send_contact( &self, p: SendContactParams, ) -> Result<MessageResponse, WiError>
pub async fn send_sticker( &self, p: SendStickerParams, ) -> Result<MessageResponse, WiError>
pub async fn send_poll( &self, p: SendPollParams, ) -> Result<MessageResponse, WiError>
pub async fn react(&self, p: SendReactionParams) -> Result<(), WiError>
pub async fn mark_read(&self, p: MarkReadParams) -> Result<(), WiError>
pub async fn presence(&self, p: PresenceParams) -> Result<(), WiError>
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Session
impl !UnwindSafe for Session
impl Freeze for Session
impl Send for Session
impl Sync for Session
impl Unpin for Session
impl UnsafeUnpin for Session
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