pub struct Row { /* private fields */ }Implementations§
Source§impl Row
impl Row
pub fn new() -> Row
pub fn get(&self, key: VarId) -> Option<&LoraValue>
Sourcepub fn get_name(&self, key: VarId) -> Option<String>
pub fn get_name(&self, key: VarId) -> Option<String>
Returns the column name for key, generating the _{key} fallback
on demand for entries inserted without an explicit name.
pub fn insert(&mut self, key: VarId, value: LoraValue)
pub fn insert_named( &mut self, key: VarId, name: impl Into<String>, value: LoraValue, )
pub fn extend_from(&mut self, other: &Row)
pub fn iter(&self) -> impl Iterator<Item = (&VarId, &LoraValue)>
Sourcepub fn iter_named(
&self,
) -> impl Iterator<Item = (&VarId, Cow<'_, str>, &LoraValue)>
pub fn iter_named( &self, ) -> impl Iterator<Item = (&VarId, Cow<'_, str>, &LoraValue)>
Iterate (key, name, value). The name is a Cow: borrowed when an
explicit name was stored, and owned (lazily formatted as _{key}) for
entries inserted via the anonymous insert() path.
Sourcepub fn into_iter_named(self) -> impl Iterator<Item = (VarId, String, LoraValue)>
pub fn into_iter_named(self) -> impl Iterator<Item = (VarId, String, LoraValue)>
Consume the row and yield owned (VarId, name, LoraValue) triples.
Used by hydrate_row to avoid cloning values on the projection hot path.
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn contains_key(&self, key: VarId) -> bool
Trait Implementations§
Source§impl Serialize for Row
impl Serialize for Row
Source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for Row
Auto Trait Implementations§
impl Freeze for Row
impl RefUnwindSafe for Row
impl Send for Row
impl Sync for Row
impl Unpin for Row
impl UnsafeUnpin for Row
impl UnwindSafe for Row
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