Struct twilly::conversation::Conversations
source · pub struct Conversations<'a> {
pub client: &'a Client,
}Expand description
Holds conversation related functions accessible on the client.
Fields§
§client: &'a ClientImplementations§
source§impl<'a> Conversations<'a>
impl<'a> Conversations<'a>
sourcepub fn get(&self, sid: &str) -> Result<Conversation, TwilioError>
pub fn get(&self, sid: &str) -> Result<Conversation, TwilioError>
Takes in a sid argument which can also be the conversations uniqueName.
sourcepub fn list(
&self,
start_date: Option<NaiveDate>,
end_date: Option<NaiveDate>,
state: Option<State>
) -> Result<Vec<Conversation>, TwilioError>
pub fn list( &self, start_date: Option<NaiveDate>, end_date: Option<NaiveDate>, state: Option<State> ) -> Result<Vec<Conversation>, TwilioError>
This will eagerly fetch all conversations on the Twilio account and sort by recent message activity.
Takes in start_date and end_date options to filter results. This should be ISO8601 format e.g. YYYY-MM-DDT00:00:00Z.
Also accepts a state option to filter by Conversation state such as closed Conversations.
sourcepub fn update(
&self,
sid: &str,
updates: UpdateConversation
) -> Result<Conversation, TwilioError>
pub fn update( &self, sid: &str, updates: UpdateConversation ) -> Result<Conversation, TwilioError>
Takes in a sid argument which can also be the conversations uniqueName and updates the resource with the
provided properties.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for Conversations<'a>
impl<'a> Send for Conversations<'a>
impl<'a> Sync for Conversations<'a>
impl<'a> Unpin for Conversations<'a>
impl<'a> !UnwindSafe for Conversations<'a>
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