Skip to main content

DistinguishedFieldBorrowDecoder

Trait DistinguishedFieldBorrowDecoder 

Source
pub trait DistinguishedFieldBorrowDecoder<'a, E, T>: DistinguishedValueBorrowDecoder<'a, E, T> {
    // Required method
    fn borrow_decode_field_distinguished<const ALLOW_EMPTY: bool>(
        wire_type: WireType,
        value: &mut T,
        buf: Capped<'_, &'a [u8]>,
        ctx: RestrictedDecodeContext,
    ) -> Result<Canonicity, DecodeError>;
}
Expand description

Affiliated helper trait for DistinguishedBorrowDecoder that provides obligate implementations for handling field keys and wire types.

Required Methods§

Source

fn borrow_decode_field_distinguished<const ALLOW_EMPTY: bool>( wire_type: WireType, value: &mut T, buf: Capped<'_, &'a [u8]>, ctx: RestrictedDecodeContext, ) -> Result<Canonicity, DecodeError>

Decodes a field directly from the buffer, also checking the wire type.

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<'a, T, E> DistinguishedFieldBorrowDecoder<'a, E, T> for ()

Source§

fn borrow_decode_field_distinguished<const ALLOW_EMPTY: bool>( wire_type: WireType, value: &mut T, buf: Capped<'_, &'a [u8]>, ctx: RestrictedDecodeContext, ) -> Result<Canonicity, DecodeError>

Implementors§