[−][src]Trait sise::Reader
A trait to allow reading SISE nodes from a generic source. See
example from Parser
.
Associated Types
type Error
The error type that may be produced while reading.
type String: Into<String> + AsRef<str>
A type that can be either a borrowed as a str
or converted
into an owned String
.
type Pos
A type that represent the position of a node.
Required methods
fn read(&mut self) -> Result<ReadItem<Self::String, Self::Pos>, Self::Error>
Reads from the source. It shall panic if the root node has
been completely read (e.g., the ListEnding
that matches the
first ListBeginning
has been read).
fn finish(self) -> Result<(), Self::Error>
Finished the reader, consuming it. It must be called only after the root node has been completely read. It may return an error if an error is encountered after the root node (e.g., trailing tokens at the end of the file).