[−][src]Trait spectrum::StyledFragmentTrait
A StyledFragmentTrait represents a fragment of content that can be emitted into an output stream (through an EmitBackend).
An implementation of StyledFragmentTrait must implement emit_into_formatter
, and gets default
implementations of emit_into
, which takes a fmt::Write
and a backend and writes into the
fmt::Write
, and emit_into_string
, which takes a backend and produces a String
.
In general, you should implement StyledFragmentTrait and store StyledFragment.
Required methods
fn clone_frag(&self) -> StyledFragment
fn emit_into_formatter(
&self,
f: &mut Formatter<'_>,
backend: &EmitBackend<'_>
) -> EmitResult
&self,
f: &mut Formatter<'_>,
backend: &EmitBackend<'_>
) -> EmitResult
Implementors
impl StyledFragmentTrait for StyledLine
[src]
fn emit_into_formatter(
&self,
f: &mut Formatter<'_>,
backend: &EmitBackend<'_>
) -> EmitResult
[src]
&self,
f: &mut Formatter<'_>,
backend: &EmitBackend<'_>
) -> EmitResult
fn clone_frag(&self) -> StyledFragment
[src]
impl StyledFragmentTrait for StyledNewline
[src]
fn emit_into_formatter(
&self,
f: &mut Formatter<'_>,
backend: &EmitBackend<'_>
) -> EmitResult
[src]
&self,
f: &mut Formatter<'_>,
backend: &EmitBackend<'_>
) -> EmitResult
fn clone_frag(&self) -> StyledFragment
[src]
impl StyledFragmentTrait for StyledString
[src]
fn emit_into_formatter(
&self,
f: &mut Formatter<'_>,
backend: &EmitBackend<'_>
) -> EmitResult
[src]
&self,
f: &mut Formatter<'_>,
backend: &EmitBackend<'_>
) -> EmitResult