pub struct PrintSpanColored<'a>(/* private fields */);
Expand description
A wrapper around Span
that provides colored pretty-printing
§Examples
use mc_legacy_formatting::{SpanExt, Span};
let s = "§4This will be dark red §oand italic";
s.span_iter().map(Span::wrap_colored).for_each(|s| print!("{}", s));
println!();
// Output will look close to what you'd see in Minecraft (ignoring the font difference)
Trait Implementations§
Source§impl<'a> Display for PrintSpanColored<'a>
impl<'a> Display for PrintSpanColored<'a>
Auto Trait Implementations§
impl<'a> Freeze for PrintSpanColored<'a>
impl<'a> RefUnwindSafe for PrintSpanColored<'a>
impl<'a> Send for PrintSpanColored<'a>
impl<'a> Sync for PrintSpanColored<'a>
impl<'a> Unpin for PrintSpanColored<'a>
impl<'a> UnwindSafe for PrintSpanColored<'a>
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