Dial

Struct Dial 

Source
pub struct Dial {
    pub attributes: DialAttributes,
    pub number: Option<String>,
    pub nested: Vec<DialNoun>,
}

Fields§

§attributes: DialAttributes§number: Option<String>§nested: Vec<DialNoun>

Implementations§

Source§

impl Dial

Source

pub fn new() -> Self

Examples found in repository?
examples/voice_call.rs (line 70)
69fn call_forwarding() {
70    let dial = Dial::new()
71        .timeout(30)
72        .add_number(DialNumber::new("+15559876543").send_digits("wwww1234"));
73
74    let response = VoiceResponse::new()
75        .say("Please wait while we connect your call.")
76        .dial_with(dial)
77        .say("The call could not be completed. Please try again later.")
78        .hangup();
79
80    println!("{}", response.to_xml());
81}
Source

pub fn with_attributes(attributes: DialAttributes) -> Self

Source

pub fn number(self, number: impl Into<String>) -> Self

Source

pub fn timeout(self, timeout: u32) -> Self

Examples found in repository?
examples/voice_call.rs (line 71)
69fn call_forwarding() {
70    let dial = Dial::new()
71        .timeout(30)
72        .add_number(DialNumber::new("+15559876543").send_digits("wwww1234"));
73
74    let response = VoiceResponse::new()
75        .say("Please wait while we connect your call.")
76        .dial_with(dial)
77        .say("The call could not be completed. Please try again later.")
78        .hangup();
79
80    println!("{}", response.to_xml());
81}
Source

pub fn call_reason(self, call_reason: impl Into<String>) -> Self

Source

pub fn add_number(self, number: DialNumber) -> Self

Examples found in repository?
examples/voice_call.rs (line 72)
69fn call_forwarding() {
70    let dial = Dial::new()
71        .timeout(30)
72        .add_number(DialNumber::new("+15559876543").send_digits("wwww1234"));
73
74    let response = VoiceResponse::new()
75        .say("Please wait while we connect your call.")
76        .dial_with(dial)
77        .say("The call could not be completed. Please try again later.")
78        .hangup();
79
80    println!("{}", response.to_xml());
81}
Source

pub fn add_client(self, client: DialClient) -> Self

Source

pub fn add_conference(self, conference: DialConference) -> Self

Source

pub fn add_queue(self, queue: DialQueue) -> Self

Source

pub fn add_sip(self, sip: DialSip) -> Self

Source

pub fn add_sim(self, sim: DialSim) -> Self

Source

pub fn add_application(self, application: DialApplication) -> Self

Source

pub fn add_whatsapp(self, whatsapp: DialWhatsApp) -> Self

Trait Implementations§

Source§

impl Clone for Dial

Source§

fn clone(&self) -> Dial

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Dial

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for Dial

§

impl RefUnwindSafe for Dial

§

impl Send for Dial

§

impl Sync for Dial

§

impl Unpin for Dial

§

impl UnwindSafe for Dial

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.