pub struct ElemWriter<T>(/* private fields */);
Expand description
Create elements with a start and end tag, or elements with a single tag.
Implementations§
Source§impl<'a> ElemWriter<&'a mut dyn Write>
impl<'a> ElemWriter<&'a mut dyn Write>
Sourcepub fn swap_writer(&mut self, other: &'a mut dyn Write)
pub fn swap_writer(&mut self, other: &'a mut dyn Write)
Swap out the writer before the closing elements are written out.
Source§impl<T: Write> ElemWriter<T>
impl<T: Write> ElemWriter<T>
pub fn into_writer(self) -> T
Sourcepub fn writer(&mut self) -> &mut T
👎Deprecated: please use writer_escapable or writer_safe
instead
pub fn writer(&mut self) -> &mut T
writer_escapable or writer_safe
insteadWARNING: The user can escape xml here and inject any xml elements.
pub fn writer_safe(&mut self) -> EscapeGuard<&mut T>
Sourcepub fn writer_escapable(&mut self) -> &mut T
pub fn writer_escapable(&mut self) -> &mut T
WARNING: The user can escape xml here and inject any xml elements.
pub fn put_raw(&mut self, a: impl Display) -> Result
Sourcepub fn put_raw_escapable(&mut self, a: impl Display) -> Result
pub fn put_raw_escapable(&mut self, a: impl Display) -> Result
WARNING: The user can escape xml here and inject any xml elements.
pub fn single<D: Display>( &mut self, tag: D, func: impl FnOnce(&mut AttrWriter<'_, T>) -> Result, ) -> Result
pub fn elem<D: Display, K>( &mut self, tag: D, func: impl FnOnce(&mut AttrWriter<'_, T>) -> Result<K, Error>, ) -> Result<ElementBridge<'_, T, D, K>, Error>
Auto Trait Implementations§
impl<T> Freeze for ElemWriter<T>where
T: Freeze,
impl<T> RefUnwindSafe for ElemWriter<T>where
T: RefUnwindSafe,
impl<T> Send for ElemWriter<T>where
T: Send,
impl<T> Sync for ElemWriter<T>where
T: Sync,
impl<T> Unpin for ElemWriter<T>where
T: Unpin,
impl<T> UnwindSafe for ElemWriter<T>where
T: 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