DialNumber

Struct DialNumber 

Source
pub struct DialNumber {
Show 16 fields pub number: String, pub send_digits: Option<String>, pub url: Option<String>, pub method: Option<String>, pub status_callback: Option<String>, pub status_callback_event: Option<Vec<String>>, pub status_callback_method: Option<String>, pub call_reason: Option<String>, pub byoc: Option<String>, pub machine_detection: Option<String>, pub machine_detection_timeout: Option<u32>, pub machine_detection_speech_threshold: Option<u32>, pub machine_detection_speech_end_threshold: Option<u32>, pub machine_detection_silence_timeout: Option<u32>, pub amd_status_callback: Option<String>, pub amd_status_callback_method: Option<String>,
}

Fields§

§number: String§send_digits: Option<String>§url: Option<String>§method: Option<String>§status_callback: Option<String>§status_callback_event: Option<Vec<String>>§status_callback_method: Option<String>§call_reason: Option<String>§byoc: Option<String>§machine_detection: Option<String>§machine_detection_timeout: Option<u32>§machine_detection_speech_threshold: Option<u32>§machine_detection_speech_end_threshold: Option<u32>§machine_detection_silence_timeout: Option<u32>§amd_status_callback: Option<String>§amd_status_callback_method: Option<String>

Implementations§

Source§

impl DialNumber

Source

pub fn new(number: impl Into<String>) -> 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 send_digits(self, digits: impl Into<String>) -> 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 url(self, url: impl Into<String>) -> Self

Source

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

Source

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

Source

pub fn status_callback_event(self, events: Vec<String>) -> Self

Source

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

Source

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

Source

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

Source

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

Source

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

Source

pub fn machine_detection_speech_threshold(self, threshold: u32) -> Self

Source

pub fn machine_detection_speech_end_threshold(self, threshold: u32) -> Self

Source

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

Source

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

Source

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

Trait Implementations§

Source§

impl Clone for DialNumber

Source§

fn clone(&self) -> DialNumber

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 DialNumber

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

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.