[−][src]Struct ssz::SszDecoderBuilder
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> Sync for SszDecoderBuilder<'a>
impl<'a> Unpin for SszDecoderBuilder<'a>
impl<'a> Send for SszDecoderBuilder<'a>
impl<'a> RefUnwindSafe for SszDecoderBuilder<'a>
impl<'a> UnwindSafe for SszDecoderBuilder<'a>
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,