pub struct ResponsePayload { /* private fields */ }Expand description
Payload of a response that consists of buffers, which are sent one after another.
This allows sending large buffers as a part of the response without copying them into a single buffer first.
Implementations§
Source§impl ResponsePayload
impl ResponsePayload
Sourcepub fn push<A>(&mut self, buffer: SharedAlignedBuffer<A>)where
A: Alignment,
pub fn push<A>(&mut self, buffer: SharedAlignedBuffer<A>)where
A: Alignment,
Append a buffer to the payload
Sourcepub fn into_buffer(self) -> SharedAlignedBuffer<Align1>
pub fn into_buffer(self) -> SharedAlignedBuffer<Align1>
Convert into a single buffer, which copies the contents of the payload unless it consists of a single buffer.
§Panics
If the payload is larger than [OwnedAlignedBuffer::MAX_CAPACITY] or allocation fails
Trait Implementations§
Source§impl Clone for ResponsePayload
impl Clone for ResponsePayload
Source§impl Debug for ResponsePayload
impl Debug for ResponsePayload
Source§impl Default for ResponsePayload
impl Default for ResponsePayload
Auto Trait Implementations§
impl Forget for ResponsePayload
impl Freeze for ResponsePayload
impl Move for ResponsePayload
impl RefUnwindSafe for ResponsePayload
impl Send for ResponsePayload
impl Sync for ResponsePayload
impl Unpin for ResponsePayload
impl UnsafeUnpin for ResponsePayload
impl UnwindSafe for ResponsePayload
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§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§impl<H> NewMerkleHasherForTreeSize for Hwhere
H: Default,
impl<H> NewMerkleHasherForTreeSize for Hwhere
H: Default,
§fn new_for_tree_size(_num_leaves: u64) -> H
fn new_for_tree_size(_num_leaves: u64) -> H
Create a hasher for a tree with
num_leaves leaves