pub struct TwilioClient { /* private fields */ }Implementations§
Source§impl TwilioClient
impl TwilioClient
pub fn account_sid(&self) -> &str
pub fn auth_token(&self) -> &str
pub fn from_env() -> Result<Self>
pub fn new( account_sid: impl Into<String>, auth_token: impl Into<String>, ) -> Self
pub async fn hit<E: TwilioEndpoint>( &self, endpoint: E, ) -> Result<E::ResponseBody>
pub fn number(&self) -> Option<&str>
pub fn with_number(self, number: impl Into<String>) -> Self
pub fn with_base_url(self, base_url: Url) -> Self
pub fn validate_request( &self, method: &Method, uri: &Uri, headers: &HeaderMap, post_params: Option<&BTreeMap<String, String>>, ) -> Result<()>
Trait Implementations§
Source§impl Clone for TwilioClient
impl Clone for TwilioClient
Source§fn clone(&self) -> TwilioClient
fn clone(&self) -> TwilioClient
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 moreSource§impl Debug for TwilioClient
impl Debug for TwilioClient
Source§impl TwilioClientExt for TwilioClient
impl TwilioClientExt for TwilioClient
async fn create_call_with_twiml( &self, to: &str, from: &str, twiml: &str, ) -> Result<<CreateCall<'_> as TwilioEndpoint>::ResponseBody>
async fn create_call_with_url( &self, to: &str, from: &str, url: &str, ) -> Result<<CreateCall<'_> as TwilioEndpoint>::ResponseBody>
async fn update_call_with_twiml( &self, call_sid: &str, twiml: &str, ) -> Result<<UpdateCall<'_> as TwilioEndpoint>::ResponseBody>
async fn update_call_with_url( &self, call_sid: &str, url: &str, ) -> Result<<UpdateCall<'_> as TwilioEndpoint>::ResponseBody>
Auto Trait Implementations§
impl Freeze for TwilioClient
impl !RefUnwindSafe for TwilioClient
impl Send for TwilioClient
impl Sync for TwilioClient
impl Unpin for TwilioClient
impl !UnwindSafe for TwilioClient
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