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
impl Dial
Sourcepub fn new() -> Self
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}pub fn with_attributes(attributes: DialAttributes) -> Self
pub fn number(self, number: impl Into<String>) -> Self
Sourcepub fn timeout(self, timeout: u32) -> Self
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}pub fn call_reason(self, call_reason: impl Into<String>) -> Self
Sourcepub fn add_number(self, number: DialNumber) -> Self
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}pub fn add_client(self, client: DialClient) -> Self
pub fn add_conference(self, conference: DialConference) -> Self
pub fn add_queue(self, queue: DialQueue) -> Self
pub fn add_sip(self, sip: DialSip) -> Self
pub fn add_sim(self, sim: DialSim) -> Self
pub fn add_application(self, application: DialApplication) -> Self
pub fn add_whatsapp(self, whatsapp: DialWhatsApp) -> Self
Trait Implementations§
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> 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