pub struct Record(/* private fields */);
Expand description
Represents a record.
Implementations§
Source§impl Record
impl Record
Sourcepub fn from_slice<K: Into<String> + Clone>(s: &[(K, RecordValue)]) -> Self
pub fn from_slice<K: Into<String> + Clone>(s: &[(K, RecordValue)]) -> Self
Create Record
from slice of (Into<String>, RecordValue)
.
Sourcepub fn keys(&self) -> Keys<'_, String, RecordValue>
pub fn keys(&self) -> Keys<'_, String, RecordValue>
Get keys.
Sourcepub fn insert(&mut self, k: impl Into<String>, v: RecordValue)
pub fn insert(&mut self, k: impl Into<String>, v: RecordValue)
Insert a key-value pair into the record.
Sourcepub fn iter(&self) -> Iter<'_, String, RecordValue>
pub fn iter(&self) -> Iter<'_, String, RecordValue>
Return an iterator over key-value pairs in the record.
Sourcepub fn into_iter_in_record(self) -> IntoIter<String, RecordValue>
pub fn into_iter_in_record(self) -> IntoIter<String, RecordValue>
Return an iterator over key-value pairs in the record.
Sourcepub fn get(&self, k: &str) -> Option<&RecordValue>
pub fn get(&self, k: &str) -> Option<&RecordValue>
Get the value of the given key.
Sourcepub fn get_scalar(&self, k: &str) -> Result<f32, LrrError>
pub fn get_scalar(&self, k: &str) -> Result<f32, LrrError>
Get scalar value.
key
- The key of an entry in the record.
Sourcepub fn get_array2(&self, k: &str) -> Result<(Vec<f32>, [usize; 2]), LrrError>
pub fn get_array2(&self, k: &str) -> Result<(Vec<f32>, [usize; 2]), LrrError>
Get Array2 value.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Record
impl RefUnwindSafe for Record
impl Send for Record
impl Sync for Record
impl Unpin for Record
impl UnwindSafe for Record
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