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
sourceimpl 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
sourceimpl From<RantMap> for RantMapHandle
impl From<RantMap> for RantMapHandle
sourceimpl TryIntoRant for RantMap
impl TryIntoRant for RantMap
sourcefn 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 Unpin for RantMap
impl !UnwindSafe for RantMap
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more