pub trait IntoVisitor {
type AnyVisitor<R: TypeResolver>: for<'scale, 'resolver> Visitor<Value<'scale, 'resolver> = Self, Error = Error, TypeResolver = R>;
// Required method
fn into_visitor<R: TypeResolver>() -> Self::AnyVisitor<R>;
}
Expand description
This trait can be implemented on any type that has an associated Visitor
responsible for decoding
SCALE encoded bytes to it whose error type is Error
. Anything that implements this trait gets a
DecodeAsType
implementation for free.
Required Associated Types§
Sourcetype AnyVisitor<R: TypeResolver>: for<'scale, 'resolver> Visitor<Value<'scale, 'resolver> = Self, Error = Error, TypeResolver = R>
type AnyVisitor<R: TypeResolver>: for<'scale, 'resolver> Visitor<Value<'scale, 'resolver> = Self, Error = Error, TypeResolver = R>
The visitor type used to decode SCALE encoded bytes to Self
.
Required Methods§
Sourcefn into_visitor<R: TypeResolver>() -> Self::AnyVisitor<R>
fn into_visitor<R: TypeResolver>() -> Self::AnyVisitor<R>
A means of obtaining this visitor.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.