pub struct XmlWriter { /* private fields */ }Expand description
Sequential XML writer used to emit CloudFront response bodies.
Implementations§
Source§impl XmlWriter
impl XmlWriter
Sourcepub fn buf_mut_push_namespace_open(&mut self, name: &str)
pub fn buf_mut_push_namespace_open(&mut self, name: &str)
Open the root element with the CloudFront namespace.
Source§impl XmlWriter
impl XmlWriter
Sourcepub fn with_capacity(cap: usize) -> Self
pub fn with_capacity(cap: usize) -> Self
Create a writer pre-reserving cap bytes.
Sourcepub fn declaration(&mut self)
pub fn declaration(&mut self)
Emit the XML declaration.
Sourcepub fn open_root(&mut self, name: &str, namespace: Option<&str>)
pub fn open_root(&mut self, name: &str, namespace: Option<&str>)
Open element with an optional xmlns attribute.
Sourcepub fn element_display<D: Display>(&mut self, name: &str, v: D)
pub fn element_display<D: Display>(&mut self, name: &str, v: D)
Emit <name>value</name> using Display.
Sourcepub fn optional_str(&mut self, name: &str, v: &str)
pub fn optional_str(&mut self, name: &str, v: &str)
Emit an optional string element only when v is non-empty.
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