pub struct StorageKey<A>where
A: ManagedTypeApi + ErrorApi + 'static,{ /* private fields */ }
Implementations§
Source§impl<A> StorageKey<A>where
A: ManagedTypeApi + ErrorApi + 'static,
impl<A> StorageKey<A>where
A: ManagedTypeApi + ErrorApi + 'static,
pub fn new(base_key: &[u8]) -> Self
pub fn append_bytes(&mut self, bytes: &[u8])
pub fn append_managed_buffer(&mut self, buffer: &ManagedBuffer<A>)
pub fn append_item<T>(&mut self, item: &T)where
T: NestedEncode,
pub fn to_boxed_bytes(&self) -> BoxedBytes
Trait Implementations§
Source§impl<M: ManagedTypeApi> Clone for StorageKey<M>
impl<M: ManagedTypeApi> Clone for StorageKey<M>
Source§impl<M: ManagedTypeApi> From<&str> for StorageKey<M>
impl<M: ManagedTypeApi> From<&str> for StorageKey<M>
Source§impl<M: ManagedTypeApi> From<ManagedBuffer<M>> for StorageKey<M>
impl<M: ManagedTypeApi> From<ManagedBuffer<M>> for StorageKey<M>
Source§fn from(buffer: ManagedBuffer<M>) -> Self
fn from(buffer: ManagedBuffer<M>) -> Self
Converts to this type from the input type.
Source§impl<M, const N: usize> From<ManagedByteArray<M, N>> for StorageKey<M>where
M: ManagedTypeApi + ErrorApi,
impl<M, const N: usize> From<ManagedByteArray<M, N>> for StorageKey<M>where
M: ManagedTypeApi + ErrorApi,
Source§fn from(mba: ManagedByteArray<M, N>) -> Self
fn from(mba: ManagedByteArray<M, N>) -> Self
Converts to this type from the input type.
Source§impl<A> ManagedType<A> for StorageKey<A>where
A: ManagedTypeApi + ErrorApi + 'static,
impl<A> ManagedType<A> for StorageKey<A>where
A: ManagedTypeApi + ErrorApi + 'static,
type OwnHandle = <A as HandleTypeInfo>::ManagedBufferHandle
fn get_handle(&self) -> A::ManagedBufferHandle
Source§unsafe fn forget_into_handle(self) -> Self::OwnHandle
unsafe fn forget_into_handle(self) -> Self::OwnHandle
Forgets current object (does not run destructor), but extracts the handle. Read more
Source§fn transmute_from_handle_ref(handle_ref: &A::ManagedBufferHandle) -> &Self
fn transmute_from_handle_ref(handle_ref: &A::ManagedBufferHandle) -> &Self
Implement carefully, since the underlying transmutation is an unsafe operation.
For types that wrap a handle to some VM-managed data,
make sure the type only contains the handle (plus ZSTs if necessary).
For types that just wrap another managed type it is easier, call for the wrapped object.
fn transmute_from_handle_ref_mut( handle_ref: &mut A::ManagedBufferHandle, ) -> &mut Self
fn get_raw_handle(&self) -> RawHandle
fn as_ref(&self) -> ManagedRef<'_, M, Self>
Auto Trait Implementations§
impl<A> Freeze for StorageKey<A>
impl<A> RefUnwindSafe for StorageKey<A>
impl<A> Send for StorageKey<A>
impl<A> Sync for StorageKey<A>
impl<A> Unpin for StorageKey<A>
impl<A> UnwindSafe for StorageKey<A>
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