pub struct XmlWriter { /* private fields */ }Expand description
Simple XML writer for building SES response XML.
Implementations§
Source§impl XmlWriter
impl XmlWriter
Sourcepub fn start_response(&mut self, operation: &str)
pub fn start_response(&mut self, operation: &str)
Start the response envelope: <{op}Response xmlns="...">.
Sourcepub fn start_result(&mut self, operation: &str)
pub fn start_result(&mut self, operation: &str)
Start the result element: <{op}Result>.
Sourcepub fn end_element(&mut self, name: &str)
pub fn end_element(&mut self, name: &str)
End an element: </{name}>.
Sourcepub fn write_element(&mut self, name: &str, value: &str)
pub fn write_element(&mut self, name: &str, value: &str)
Write a simple text element: <Name>Value</Name>.
Sourcepub fn write_optional_element(&mut self, name: &str, value: Option<&str>)
pub fn write_optional_element(&mut self, name: &str, value: Option<&str>)
Write an optional element (skip if None).
Sourcepub fn write_bool_element(&mut self, name: &str, value: bool)
pub fn write_bool_element(&mut self, name: &str, value: bool)
Write a boolean element: <name>true</name> or <name>false</name>.
Sourcepub fn write_f64_element(&mut self, name: &str, value: f64)
pub fn write_f64_element(&mut self, name: &str, value: f64)
Write a float element.
Sourcepub fn write_i64_element(&mut self, name: &str, value: i64)
pub fn write_i64_element(&mut self, name: &str, value: i64)
Write an i64 element.
Sourcepub fn write_response_metadata(&mut self, request_id: &str)
pub fn write_response_metadata(&mut self, request_id: &str)
Write the <ResponseMetadata> block with a <RequestId>.
Sourcepub fn into_string(self) -> String
pub fn into_string(self) -> String
Consume the writer and return the final XML string.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for XmlWriter
impl RefUnwindSafe for XmlWriter
impl Send for XmlWriter
impl Sync for XmlWriter
impl Unpin for XmlWriter
impl UnsafeUnpin for XmlWriter
impl UnwindSafe for XmlWriter
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