pub struct FaxResponse { /* private fields */ }Expand description
Implementations§
Source§impl FaxResponse
impl FaxResponse
Sourcepub fn new() -> Self
pub fn new() -> Self
Create a new FaxResponse
Examples found in repository?
examples/fax_receive.rs (line 35)
34fn simple_receive() {
35 let response = FaxResponse::new().receive(Some(ReceiveAttributes::new()));
36
37 println!("{}", response.to_xml());
38}
39
40/// Receive fax and store as PDF
41fn receive_as_pdf() {
42 let response = FaxResponse::new().receive(Some(
43 ReceiveAttributes::new()
44 .action("https://example.com/fax-received")
45 .media_type(ReceiveMediaType::ApplicationPdf),
46 ));
47
48 println!("{}", response.to_xml());
49}
50
51/// Receive fax with all configuration options
52fn receive_with_all_options() {
53 let response = FaxResponse::new().receive(Some(
54 ReceiveAttributes::new()
55 .action("https://example.com/fax-received")
56 .method("POST")
57 .media_type(ReceiveMediaType::ApplicationPdf)
58 .page_size(ReceivePageSize::Letter)
59 .store_media(true),
60 ));
61
62 println!("{}", response.to_xml());
63}
64
65/// Receive fax without storing media
66fn receive_no_storage() {
67 let response = FaxResponse::new().receive(Some(
68 ReceiveAttributes::new()
69 .action("https://example.com/fax-metadata")
70 .store_media(false),
71 ));
72
73 println!("{}", response.to_xml());
74}Sourcepub fn receive(self, attributes: Option<ReceiveAttributes>) -> Self
pub fn receive(self, attributes: Option<ReceiveAttributes>) -> Self
Examples found in repository?
examples/fax_receive.rs (line 35)
34fn simple_receive() {
35 let response = FaxResponse::new().receive(Some(ReceiveAttributes::new()));
36
37 println!("{}", response.to_xml());
38}
39
40/// Receive fax and store as PDF
41fn receive_as_pdf() {
42 let response = FaxResponse::new().receive(Some(
43 ReceiveAttributes::new()
44 .action("https://example.com/fax-received")
45 .media_type(ReceiveMediaType::ApplicationPdf),
46 ));
47
48 println!("{}", response.to_xml());
49}
50
51/// Receive fax with all configuration options
52fn receive_with_all_options() {
53 let response = FaxResponse::new().receive(Some(
54 ReceiveAttributes::new()
55 .action("https://example.com/fax-received")
56 .method("POST")
57 .media_type(ReceiveMediaType::ApplicationPdf)
58 .page_size(ReceivePageSize::Letter)
59 .store_media(true),
60 ));
61
62 println!("{}", response.to_xml());
63}
64
65/// Receive fax without storing media
66fn receive_no_storage() {
67 let response = FaxResponse::new().receive(Some(
68 ReceiveAttributes::new()
69 .action("https://example.com/fax-metadata")
70 .store_media(false),
71 ));
72
73 println!("{}", response.to_xml());
74}Sourcepub fn comment_after(self, comment: impl Into<String>) -> Self
pub fn comment_after(self, comment: impl Into<String>) -> Self
Trait Implementations§
Source§impl Clone for FaxResponse
impl Clone for FaxResponse
Source§fn clone(&self) -> FaxResponse
fn clone(&self) -> FaxResponse
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 FaxResponse
impl Debug for FaxResponse
Source§impl Default for FaxResponse
impl Default for FaxResponse
Source§fn default() -> FaxResponse
fn default() -> FaxResponse
Returns the “default value” for a type. Read more
Source§impl TwiML for FaxResponse
impl TwiML for FaxResponse
Auto Trait Implementations§
impl Freeze for FaxResponse
impl RefUnwindSafe for FaxResponse
impl Send for FaxResponse
impl Sync for FaxResponse
impl Unpin for FaxResponse
impl UnwindSafe for FaxResponse
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