Struct stylish_html::Html
source · pub struct Html<T: Write> { /* private fields */ }
Expand description
An adaptor to allow writing stylish
attributed data to an output stream
by turning attributes into HTML elements.
let mut writer = stylish::Html::new(String::new());
stylish::write!(writer, "Hello {:(fg=red)}", "Ferris")?;
assert_eq!(
writer.finish()?,
"Hello <span style=color:red>Ferris</span>",
);
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<T> RefUnwindSafe for Html<T>where T: RefUnwindSafe,
impl<T> Send for Html<T>where T: Send,
impl<T> Sync for Html<T>where T: Sync,
impl<T> Unpin for Html<T>where T: Unpin,
impl<T> UnwindSafe for Html<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