pub struct MultihashFrameBuilder<const S: usize, D: MultihashDigestExt<S>, I: FrameBuilder> { /* private fields */ }Expand description
Multihash frame builder
Implementations§
Source§impl<const S: usize, D: MultihashDigestExt<S>, I: FrameBuilder> MultihashFrameBuilder<S, D, I>
impl<const S: usize, D: MultihashDigestExt<S>, I: FrameBuilder> MultihashFrameBuilder<S, D, I>
Trait Implementations§
Source§impl<const S: usize, D: MultihashDigestExt<S>, I: FrameBuilder> FrameBuilder for MultihashFrameBuilder<S, D, I>
impl<const S: usize, D: MultihashDigestExt<S>, I: FrameBuilder> FrameBuilder for MultihashFrameBuilder<S, D, I>
type OwnedFrameType = MultihashFrame<S, D, Bytes>
Source§fn write_to<W: Write>(&self, writer: &mut W) -> Result<usize, Error>
fn write_to<W: Write>(&self, writer: &mut W) -> Result<usize, Error>
Write the frame to the given writer
Source§fn write_into(&self, into: &mut [u8]) -> Result<usize, Error>
fn write_into(&self, into: &mut [u8]) -> Result<usize, Error>
Write the frame into the given bytes slice
Source§fn expected_size(&self) -> Option<usize>
fn expected_size(&self) -> Option<usize>
Expected size of the frame (in bytes). Optional since some kind of
frames have an unknown size until they are serialized (ex: capnp)
Source§fn as_owned_frame(&self) -> Self::OwnedFrameType
fn as_owned_frame(&self) -> Self::OwnedFrameType
Creates a owned version of this frame, which is usually a FrameReader
implementation
Auto Trait Implementations§
impl<const S: usize, D, I> Freeze for MultihashFrameBuilder<S, D, I>where
I: Freeze,
impl<const S: usize, D, I> RefUnwindSafe for MultihashFrameBuilder<S, D, I>where
I: RefUnwindSafe,
D: RefUnwindSafe,
impl<const S: usize, D, I> Send for MultihashFrameBuilder<S, D, I>
impl<const S: usize, D, I> Sync for MultihashFrameBuilder<S, D, I>
impl<const S: usize, D, I> Unpin for MultihashFrameBuilder<S, D, I>
impl<const S: usize, D, I> UnwindSafe for MultihashFrameBuilder<S, D, I>where
I: UnwindSafe,
D: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more