pub struct ManagedBufferBuilderImplCached<M>where
M: ManagedTypeApi,{ /* private fields */ }
Expand description
A ManagedBuffer builder implementation that caches data to the static cache locally in the contract.
Trait Implementations§
Source§impl<M> ManagedBufferBuilderImpl<M> for ManagedBufferBuilderImplCached<M>where
M: ManagedTypeApi,
impl<M> ManagedBufferBuilderImpl<M> for ManagedBufferBuilderImplCached<M>where
M: ManagedTypeApi,
Source§fn new_from_slice(slice: &[u8]) -> ManagedBufferBuilderImplCached<M>
fn new_from_slice(slice: &[u8]) -> ManagedBufferBuilderImplCached<M>
Creates instance as lazily as possible.
If possible, the slice is loaded into the static buffer.
If not, it is saved into the managed buffer so that the data is not lost.
Use flush_to_managed_buffer
after this to ensure that the managed buffer is populated.
fn into_managed_buffer(self) -> ManagedBuffer<M>
fn append_bytes(&mut self, bytes: &[u8])
fn append_managed_buffer(&mut self, item: &ManagedBuffer<M>)
Auto Trait Implementations§
impl<M> Freeze for ManagedBufferBuilderImplCached<M>
impl<M> RefUnwindSafe for ManagedBufferBuilderImplCached<M>
impl<M> Send for ManagedBufferBuilderImplCached<M>
impl<M> Sync for ManagedBufferBuilderImplCached<M>
impl<M> Unpin for ManagedBufferBuilderImplCached<M>
impl<M> UnwindSafe for ManagedBufferBuilderImplCached<M>
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> InterpretableFrom<T> for T
impl<T> InterpretableFrom<T> for T
fn interpret_from(from: T, _context: &InterpreterContext) -> T
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