pub struct MapHandle { /* private fields */ }Implementations§
Source§impl MapHandle
impl MapHandle
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn borrow(&self) -> Ref<'_, LustMap>
pub fn borrow_mut(&self) -> RefMut<'_, LustMap>
pub fn contains_key<K>(&self, key: K) -> bool
pub fn get<K>(&self, key: K) -> Option<ValueRef<'_>>
pub fn insert<K>(&self, key: K, value: Value) -> Option<Value>
pub fn remove<K>(&self, key: K) -> Option<Value>
pub fn with_ref<R>(&self, f: impl FnOnce(&LustMap) -> R) -> R
pub fn with_mut<R>(&self, f: impl FnOnce(&mut LustMap) -> R) -> R
Trait Implementations§
Source§impl FromLustValue for MapHandle
impl FromLustValue for MapHandle
fn from_value(value: Value) -> Result<Self>
fn matches_lust_type(ty: &Type) -> bool
fn type_description() -> &'static str
Source§impl<'a> FromStructField<'a> for MapHandle
impl<'a> FromStructField<'a> for MapHandle
Source§impl IntoLustValue for MapHandle
impl IntoLustValue for MapHandle
fn into_value(self) -> Value
fn matches_lust_type(ty: &Type) -> bool
fn type_description() -> &'static str
Source§impl IntoTypedValue for MapHandle
impl IntoTypedValue for MapHandle
fn into_typed_value(self) -> TypedValue
Auto Trait Implementations§
impl Freeze for MapHandle
impl !RefUnwindSafe for MapHandle
impl !Send for MapHandle
impl !Sync for MapHandle
impl Unpin for MapHandle
impl UnsafeUnpin for MapHandle
impl !UnwindSafe for MapHandle
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