pub struct ManagedMap<M: ManagedTypeApi> { /* private fields */ }
Expand description
A byte buffer managed by an external API.
Implementations§
Source§impl<M: ManagedTypeApi> ManagedMap<M>
impl<M: ManagedTypeApi> ManagedMap<M>
Source§impl<M: ManagedTypeApi> ManagedMap<M>
impl<M: ManagedTypeApi> ManagedMap<M>
pub fn get(&self, key: &ManagedBuffer<M>) -> ManagedBuffer<M>
pub fn put(&mut self, key: &ManagedBuffer<M>, value: &ManagedBuffer<M>)
pub fn remove(&mut self, key: &ManagedBuffer<M>) -> ManagedBuffer<M>
pub fn contains(&self, key: &ManagedBuffer<M>) -> bool
Trait Implementations§
Source§impl<M: ManagedTypeApi> Default for ManagedMap<M>
impl<M: ManagedTypeApi> Default for ManagedMap<M>
Source§impl<M: ManagedTypeApi> ManagedType<M> for ManagedMap<M>
impl<M: ManagedTypeApi> ManagedType<M> for ManagedMap<M>
type OwnHandle = <M as HandleTypeInfo>::ManagedMapHandle
fn get_handle(&self) -> M::ManagedMapHandle
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: &M::ManagedMapHandle) -> &Self
fn transmute_from_handle_ref(handle_ref: &M::ManagedMapHandle) -> &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 M::ManagedMapHandle, ) -> &mut Self
fn get_raw_handle(&self) -> RawHandle
fn as_ref(&self) -> ManagedRef<'_, M, Self>
Auto Trait Implementations§
impl<M> Freeze for ManagedMap<M>
impl<M> RefUnwindSafe for ManagedMap<M>
impl<M> Send for ManagedMap<M>
impl<M> Sync for ManagedMap<M>
impl<M> Unpin for ManagedMap<M>
impl<M> UnwindSafe for ManagedMap<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