Struct syndicate::preserves::value::TextWriter [−][src]
pub struct TextWriter<W> where
W: Write, {
pub comma_style: CommaStyle,
pub indentation: usize,
pub escape_spaces: bool,
// some fields omitted
}Fields
comma_style: CommaStyleindentation: usizeescape_spaces: boolImplementations
pub fn encode<N, Enc>(enc: &mut Enc, v: &N) -> Result<String, Error> where
N: NestedValue,
Enc: DomainEncode<<N as NestedValue>::Embedded>,
Trait Implementations
type AnnWriter = TextWriter<W>
type RecWriter = TextWriter<W>
type SeqWriter = TextWriter<W>
type SetWriter = TextWriter<W>
type DictWriter = TextWriter<W>
type EmbeddedWriter = TextWriter<W>
pub fn end_annotations(
&mut self,
ann: <TextWriter<W> as Writer>::AnnWriter
) -> Result<(), Error>
pub fn start_record(
&mut self,
_field_count: Option<usize>
) -> Result<<TextWriter<W> as Writer>::RecWriter, Error>
pub fn start_sequence(
&mut self,
_item_count: Option<usize>
) -> Result<<TextWriter<W> as Writer>::SeqWriter, Error>
pub fn end_sequence(
&mut self,
seq: <TextWriter<W> as Writer>::SeqWriter
) -> Result<(), Error>
pub fn start_set(
&mut self,
_item_count: Option<usize>
) -> Result<<TextWriter<W> as Writer>::SetWriter, Error>
pub fn start_dictionary(
&mut self,
_entry_count: Option<usize>
) -> Result<<TextWriter<W> as Writer>::DictWriter, Error>
pub fn end_dictionary(
&mut self,
dict: <TextWriter<W> as Writer>::DictWriter
) -> Result<(), Error>
pub fn end_embedded(
&mut self,
ptr: <TextWriter<W> as Writer>::EmbeddedWriter
) -> Result<(), Error>
fn write<N, Enc>(&mut self, enc: &mut Enc, v: &N) -> Result<(), Error> where
N: NestedValue,
Enc: DomainEncode<<N as NestedValue>::Embedded>,
fn write_value<N, Enc>(
&mut self,
enc: &mut Enc,
v: &Value<N>
) -> Result<(), Error> where
N: NestedValue,
Enc: DomainEncode<<N as NestedValue>::Embedded>,
Auto Trait Implementations
impl<W> RefUnwindSafe for TextWriter<W> where
W: RefUnwindSafe,
impl<W> Send for TextWriter<W> where
W: Send,
impl<W> Sync for TextWriter<W> where
W: Sync,
impl<W> Unpin for TextWriter<W> where
W: Unpin,
impl<W> UnwindSafe for TextWriter<W> where
W: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span, returning an
Instrumented wrapper. Read more
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more
