[−][src]Trait sise::Writer
A trait to allow writing SISE nodes into a generic destination.
Associated Types
type Result
Type of data returned by the writer.
type Error
The error type that may be produced while writing.
type AtomOptions
Type of options that can be passed to write_atom
.
type BeginListOptions
Type of options that can be passed to begin_list
.
type EndListOptions
Type of options that can be passed to end_list
.
type FinishOptions
Type of options that can be passed to finish
.
Required methods
fn write_atom(
&mut self,
atom: &str,
opts: &Self::AtomOptions
) -> Result<(), Self::Error>
&mut self,
atom: &str,
opts: &Self::AtomOptions
) -> Result<(), Self::Error>
Writes an atom.
fn begin_list(
&mut self,
opts: &Self::BeginListOptions
) -> Result<(), Self::Error>
&mut self,
opts: &Self::BeginListOptions
) -> Result<(), Self::Error>
Begins a list.
fn end_list(&mut self, opts: &Self::EndListOptions) -> Result<(), Self::Error>
Ends a list.
fn finish(self, opts: &Self::FinishOptions) -> Result<Self::Result, Self::Error>
Consumes the writer and returns the result. It must be called only after the root node has been completely written.
Implementors
impl Writer for TreeWriter
[src]
type Result = Node
type Error = Infallible
type AtomOptions = VoidWriterOptions
type BeginListOptions = VoidWriterOptions
type EndListOptions = VoidWriterOptions
type FinishOptions = VoidWriterOptions
fn write_atom(
&mut self,
atom: &str,
_opts: &VoidWriterOptions
) -> Result<(), Infallible>
[src]
&mut self,
atom: &str,
_opts: &VoidWriterOptions
) -> Result<(), Infallible>
fn begin_list(&mut self, _opts: &VoidWriterOptions) -> Result<(), Infallible>
[src]
fn end_list(&mut self, _opts: &VoidWriterOptions) -> Result<(), Infallible>
[src]
fn finish(self, _opts: &VoidWriterOptions) -> Result<Node, Infallible>
[src]
impl<'a> Writer for CompactStringWriter<'a>
[src]
type Result = ()
type Error = Infallible
type AtomOptions = VoidWriterOptions
type BeginListOptions = VoidWriterOptions
type EndListOptions = VoidWriterOptions
type FinishOptions = VoidWriterOptions
fn write_atom(
&mut self,
atom: &str,
_opts: &VoidWriterOptions
) -> Result<(), Infallible>
[src]
&mut self,
atom: &str,
_opts: &VoidWriterOptions
) -> Result<(), Infallible>
fn begin_list(&mut self, _opts: &VoidWriterOptions) -> Result<(), Infallible>
[src]
fn end_list(&mut self, _opts: &Self::EndListOptions) -> Result<(), Infallible>
[src]
fn finish(self, _opts: &Self::FinishOptions) -> Result<(), Infallible>
[src]
impl<'a, 'b> Writer for SpacedStringWriter<'a, 'b>
[src]
type Result = ()
type Error = Infallible
type AtomOptions = SpacedStringWriterNodeOptions
type BeginListOptions = SpacedStringWriterNodeOptions
type EndListOptions = VoidWriterOptions
type FinishOptions = VoidWriterOptions
fn write_atom(
&mut self,
atom: &str,
opts: &SpacedStringWriterNodeOptions
) -> Result<(), Infallible>
[src]
&mut self,
atom: &str,
opts: &SpacedStringWriterNodeOptions
) -> Result<(), Infallible>
fn begin_list(
&mut self,
opts: &SpacedStringWriterNodeOptions
) -> Result<(), Infallible>
[src]
&mut self,
opts: &SpacedStringWriterNodeOptions
) -> Result<(), Infallible>