Trait Transcode

Source
pub trait Transcode {
    type Error;

    // Required method
    fn transcode(
        &mut self,
        schema: &Schema,
        keys: impl IntoKeys,
    ) -> Result<(), DescendError<Self::Error>>;
}
Expand description

Look up an IntoKeys in a Schema and transcode it.

Required Associated Types§

Source

type Error

The possible error when transcoding.

Use this to indicate no space or unencodable/invalid values

Required Methods§

Source

fn transcode( &mut self, schema: &Schema, keys: impl IntoKeys, ) -> Result<(), DescendError<Self::Error>>

Perform a node lookup of a K: IntoKeys on a Schema and transcode it.

This modifies self such that afterwards Self: IntoKeys can be used on M again. It returns a Node with node type and depth information.

Returning Err(ValueError::Absent) indicates that there was insufficient capacity and a key could not be encoded at the given depth.

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.

Implementations on Foreign Types§

Source§

impl Transcode for ()

Shim to provide the bare lookup/Track/Short without transcoding target

Source§

type Error = Infallible

Source§

fn transcode( &mut self, schema: &Schema, keys: impl IntoKeys, ) -> Result<(), DescendError<Self::Error>>

Source§

impl Transcode for [i8]

Source§

type Error = ()

Source§

fn transcode( &mut self, schema: &Schema, keys: impl IntoKeys, ) -> Result<(), DescendError<Self::Error>>

Source§

impl Transcode for [i16]

Source§

type Error = ()

Source§

fn transcode( &mut self, schema: &Schema, keys: impl IntoKeys, ) -> Result<(), DescendError<Self::Error>>

Source§

impl Transcode for [i32]

Source§

type Error = ()

Source§

fn transcode( &mut self, schema: &Schema, keys: impl IntoKeys, ) -> Result<(), DescendError<Self::Error>>

Source§

impl Transcode for [i64]

Source§

type Error = ()

Source§

fn transcode( &mut self, schema: &Schema, keys: impl IntoKeys, ) -> Result<(), DescendError<Self::Error>>

Source§

impl Transcode for [i128]

Source§

type Error = ()

Source§

fn transcode( &mut self, schema: &Schema, keys: impl IntoKeys, ) -> Result<(), DescendError<Self::Error>>

Source§

impl Transcode for [isize]

Source§

type Error = ()

Source§

fn transcode( &mut self, schema: &Schema, keys: impl IntoKeys, ) -> Result<(), DescendError<Self::Error>>

Source§

impl Transcode for [u8]

Source§

type Error = ()

Source§

fn transcode( &mut self, schema: &Schema, keys: impl IntoKeys, ) -> Result<(), DescendError<Self::Error>>

Source§

impl Transcode for [u16]

Source§

type Error = ()

Source§

fn transcode( &mut self, schema: &Schema, keys: impl IntoKeys, ) -> Result<(), DescendError<Self::Error>>

Source§

impl Transcode for [u32]

Source§

type Error = ()

Source§

fn transcode( &mut self, schema: &Schema, keys: impl IntoKeys, ) -> Result<(), DescendError<Self::Error>>

Source§

impl Transcode for [u64]

Source§

type Error = ()

Source§

fn transcode( &mut self, schema: &Schema, keys: impl IntoKeys, ) -> Result<(), DescendError<Self::Error>>

Source§

impl Transcode for [u128]

Source§

type Error = ()

Source§

fn transcode( &mut self, schema: &Schema, keys: impl IntoKeys, ) -> Result<(), DescendError<Self::Error>>

Source§

impl Transcode for [usize]

Source§

type Error = ()

Source§

fn transcode( &mut self, schema: &Schema, keys: impl IntoKeys, ) -> Result<(), DescendError<Self::Error>>

Source§

impl<T, const N: usize> Transcode for Vec<T, N>
where usize: TryInto<T>,

Source§

type Error = ()

Source§

fn transcode( &mut self, schema: &Schema, keys: impl IntoKeys, ) -> Result<(), DescendError<Self::Error>>

Source§

impl<T: Transcode + ?Sized> Transcode for &mut T

Source§

type Error = <T as Transcode>::Error

Source§

fn transcode( &mut self, schema: &Schema, keys: impl IntoKeys, ) -> Result<(), DescendError<Self::Error>>

Implementors§