pub struct RantMap { /* private fields */ }Expand description
Represents Rant’s map type, which stores a mutable collection of key-value pairs.
Map keys are always strings.
Implementations§
Source§impl RantMap
impl RantMap
pub fn new() -> Self
pub fn into_handle(self) -> RantMapHandle
pub fn clear(&mut self)
pub fn raw_len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn proto(&self) -> Option<RantMapHandle>
pub fn extend<M: Deref<Target = RantMap>>(&mut self, other: M)
pub fn set_proto(&mut self, proto: Option<RantMapHandle>)
pub fn raw_set(&mut self, key: &str, val: RantValue)
pub fn raw_remove(&mut self, key: &str)
pub fn raw_take(&mut self, key: &str) -> Option<RantValue>
pub fn raw_get(&self, key: &str) -> Option<&RantValue>
pub fn get(&self, key: &str) -> Option<Cow<'_, RantValue>>
pub fn raw_has_key(&self, key: &str) -> bool
pub fn raw_keys(&self) -> RantList
pub fn raw_values(&self) -> RantList
Trait Implementations§
Source§impl From<RantMap> for RantMapHandle
impl From<RantMap> for RantMapHandle
Source§impl TryIntoRant for RantMap
impl TryIntoRant for RantMap
Source§fn try_into_rant(self) -> Result<RantValue, ValueError>
fn try_into_rant(self) -> Result<RantValue, ValueError>
Attempts to convert to a
RantValue.Auto Trait Implementations§
impl !RefUnwindSafe for RantMap
impl !Send for RantMap
impl !Sync for RantMap
impl !UnwindSafe for RantMap
impl Freeze for RantMap
impl Unpin for RantMap
impl UnsafeUnpin for RantMap
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