pub struct WhatsappClient { /* private fields */ }Implementations§
Source§impl WhatsappClient
impl WhatsappClient
pub fn new(access_token: &str, phone_number_id: &str) -> Self
pub fn version(&mut self) -> &str
pub fn set_version(&mut self, version: &str)
pub fn set_access_token(&mut self, access_token: &str)
pub fn set_phone_number_id(&mut self, phone_number_id: &str)
pub async fn send_message( &self, message: &Message, ) -> Result<MessageResponse, WhatsappError>
pub async fn request_code( &self, code_method: CodeMethod, language: &str, ) -> Result<PhoneNumberResponse, WhatsappError>
pub async fn verify_code( &self, code: &str, ) -> Result<PhoneNumberResponse, WhatsappError>
pub async fn mark_message_as_read( &self, message_id: &str, ) -> Result<MessageStatusResponse, WhatsappError>
pub async fn get_media( &self, media_id: &str, ) -> Result<MediaResponse, WhatsappError>
Auto Trait Implementations§
impl Freeze for WhatsappClient
impl RefUnwindSafe for WhatsappClient
impl Send for WhatsappClient
impl Sync for WhatsappClient
impl Unpin for WhatsappClient
impl UnsafeUnpin for WhatsappClient
impl UnwindSafe for WhatsappClient
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