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]) -> Self
fn new_from_slice(slice: &[u8]) -> Self
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