Module visitor

Module visitor 

Source
Expand description

The Visitor trait and associated types.

Modules§

types
Types used in the super::Visitor trait definition.

Structs§

IgnoreVisitor
A Visitor implementation that just ignores all of the bytes.
VisitorWithCrateError
Some Visitor implementations may want to return an error type other than crate::Error, which means that they would not be automatically compatible with crate::IntoVisitor, which requires visitors that do return crate::Error errors.

Enums§

DecodeAsTypeResult
The response from Visitor::unchecked_decode_as_type().
DecodeError
An error decoding SCALE bytes.
Unexpected
This is returned by default when a visitor function isn’t implemented.

Traits§

DecodeItemIterator
This is implemented for visitor related types which have a decode_item method, and allows you to generically talk about decoding unnamed items.
Visitor
An implementation of the Visitor trait can be passed to the decode_with_visitor() function, and is handed back values as they are encountered. It’s up to the implementation to decide what to do with these values.

Functions§

decode_with_visitor
Decode data according to the type ID and type resolver provided. The provided pointer to the data slice will be moved forwards as needed depending on what was decoded, and a method on the provided Visitor will be called depending on the type that needs to be decoded.

Type Aliases§

TypeIdFor
Return the type ID type of some Visitor.