Skip to main content

DecodeWithVersion

Trait DecodeWithVersion 

Source
pub trait DecodeWithVersion: Sized {
    // Required method
    fn decode_with_version<I: Input>(
        extension_version: u8,
        input: &mut I,
    ) -> Result<Self, Error>;
}
Expand description

A type that can be decoded from a specific version and a codec::Input.

Required Methods§

Source

fn decode_with_version<I: Input>( extension_version: u8, input: &mut I, ) -> Result<Self, Error>

Decode the type from the given version and input.

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.

Implementors§

Source§

impl DecodeWithVersion for InvalidVersion

Source§

impl<A: DecodeWithVersion + MultiVersionItem, B: DecodeWithVersion + MultiVersionItem, C: DecodeWithVersion + MultiVersionItem, D: DecodeWithVersion + MultiVersionItem, E: DecodeWithVersion + MultiVersionItem, F: DecodeWithVersion + MultiVersionItem, G: DecodeWithVersion + MultiVersionItem, H: DecodeWithVersion + MultiVersionItem, I: DecodeWithVersion + MultiVersionItem, J: DecodeWithVersion + MultiVersionItem, K: DecodeWithVersion + MultiVersionItem, L: DecodeWithVersion + MultiVersionItem, M: DecodeWithVersion + MultiVersionItem, N: DecodeWithVersion + MultiVersionItem, O: DecodeWithVersion + MultiVersionItem, P: DecodeWithVersion + MultiVersionItem, Q: DecodeWithVersion + MultiVersionItem, R: DecodeWithVersion + MultiVersionItem, S: DecodeWithVersion + MultiVersionItem, T: DecodeWithVersion + MultiVersionItem, U: DecodeWithVersion + MultiVersionItem, V: DecodeWithVersion + MultiVersionItem, W: DecodeWithVersion + MultiVersionItem, X: DecodeWithVersion + MultiVersionItem, Y: DecodeWithVersion + MultiVersionItem, Z: DecodeWithVersion + MultiVersionItem> DecodeWithVersion for MultiVersion<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z>

Source§

impl<ExtensionV0: Decode, ExtensionOtherVersions: DecodeWithVersion> DecodeWithVersion for ExtensionVariant<ExtensionV0, ExtensionOtherVersions>

Source§

impl<const VERSION: u8, Extension: Decode> DecodeWithVersion for PipelineAtVers<VERSION, Extension>