[][src]Struct ssz::SszDecoderBuilder

pub struct SszDecoderBuilder<'a> { /* fields omitted */ }

Builds an SszDecoder.

The purpose of this struct is to split some SSZ bytes into individual slices. The builder is then converted into a SszDecoder which decodes those values into object instances.

See SszDecoder for usage examples.

Methods

impl<'a> SszDecoderBuilder<'a>[src]

pub fn new(bytes: &'a [u8]) -> Self[src]

Instantiate a new builder that should build a SszDecoder over the given bytes which are assumed to be the SSZ encoding of some object.

pub fn register_type<T: Decode>(&mut self) -> Result<(), DecodeError>[src]

Declares that some type T is the next item in bytes.

pub fn build(self) -> Result<SszDecoder<'a>, DecodeError>[src]

Finalizes the builder, returning a SszDecoder that may be used to instantiate objects.

Auto Trait Implementations

impl<'a> Send for SszDecoderBuilder<'a>

impl<'a> Unpin for SszDecoderBuilder<'a>

impl<'a> Sync for SszDecoderBuilder<'a>

impl<'a> UnwindSafe for SszDecoderBuilder<'a>

impl<'a> RefUnwindSafe for SszDecoderBuilder<'a>

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]