pub struct XmlWriter<W> { /* private fields */ }Expand description
A convenience wrapper for RPKI XML generation
This type only exposes things we need for the RPKI XML structures.
Implementations§
Source§impl<W: Write> XmlWriter<W>
Generate the XML.
impl<W: Write> XmlWriter<W>
Generate the XML.
Sourcepub fn put_element<F>(
&mut self,
name: &str,
attr: Option<&[(&str, &str)]>,
op: F,
) -> Result<(), Error>
pub fn put_element<F>( &mut self, name: &str, attr: Option<&[(&str, &str)]>, op: F, ) -> Result<(), Error>
Adds an element
Sourcepub fn put_text(&mut self, text: &str) -> Result<(), Error>
pub fn put_text(&mut self, text: &str) -> Result<(), Error>
Puts some String in a characters element
Sourcepub fn put_base64_std(&mut self, bytes: &Bytes) -> Result<(), Error>
pub fn put_base64_std(&mut self, bytes: &Bytes) -> Result<(), Error>
Converts bytes to base64 encoded Characters as the content, using the Standard character set, without padding.
Auto Trait Implementations§
impl<W> Freeze for XmlWriter<W>where
W: Freeze,
impl<W> RefUnwindSafe for XmlWriter<W>where
W: RefUnwindSafe,
impl<W> Send for XmlWriter<W>where
W: Send,
impl<W> Sync for XmlWriter<W>where
W: Sync,
impl<W> Unpin for XmlWriter<W>where
W: Unpin,
impl<W> UnwindSafe for XmlWriter<W>where
W: UnwindSafe,
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