pub struct StructMap { /* private fields */ }Expand description
A map of named fields with typed values.
Implementations§
Source§impl StructMap
impl StructMap
pub fn new() -> Self
pub fn set(&mut self, name: &str, val: FieldVal)
pub fn get(&self, name: &str) -> Option<&FieldVal>
pub fn remove(&mut self, name: &str) -> bool
pub fn contains(&self, name: &str) -> bool
pub fn field_count(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn field_names(&self) -> Vec<String>
pub fn get_bool(&self, name: &str) -> Option<bool>
pub fn get_int(&self, name: &str) -> Option<i64>
pub fn get_float(&self, name: &str) -> Option<f32>
pub fn get_str(&self, name: &str) -> Option<&str>
pub fn missing_declared(&self) -> Vec<String>
pub fn clear(&mut self)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for StructMap
impl RefUnwindSafe for StructMap
impl Send for StructMap
impl Sync for StructMap
impl Unpin for StructMap
impl UnsafeUnpin for StructMap
impl UnwindSafe for StructMap
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