pub trait ConvertSymbols<Sym, Error> {
// Required methods
fn process_symbol(&mut self, symbol: Sym) -> Result<Option<&[u8]>, Error>;
fn process_tail(&mut self) -> Result<Option<&[u8]>, Error>;
}Expand description
A type that helps convert the symbols in presentation format.
This trait is used by Scanner::convert_token with Symbols and
Scanner::convert_entry with [EntrySymbol]s.
For each symbol, process_symbol is
called. When the end of token or entry is reached,
process_tail is called, giving the
implementer a chance to return any remaining data.
Required Methods§
Sourcefn process_symbol(&mut self, symbol: Sym) -> Result<Option<&[u8]>, Error>
fn process_symbol(&mut self, symbol: Sym) -> Result<Option<&[u8]>, Error>
Processes the next symbol.
If the method returns some data, it will be appended to the output octets sequence.
Sourcefn process_tail(&mut self) -> Result<Option<&[u8]>, Error>
fn process_tail(&mut self) -> Result<Option<&[u8]>, Error>
Process the end of token.
If the method returns some data, it will be appended to the output octets sequence.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".