pub struct Row { /* private fields */ }Expand description
One row: named columns, in insertion order.
Ordered rather than a map because a key row’s column order is the table’s
key order, and a lookup that reordered the key columns would ask for a
different row. BTreeMap would silently sort them.
Implementations§
Source§impl Row
impl Row
pub fn new() -> Self
Sourcepub fn with(self, name: impl Into<String>, value: impl Into<Value>) -> Self
pub fn with(self, name: impl Into<String>, value: impl Into<Value>) -> Self
Adds a column, keeping the order it was added in.
Sourcepub fn set(&mut self, name: impl Into<String>, value: impl Into<Value>)
pub fn set(&mut self, name: impl Into<String>, value: impl Into<Value>)
Adds a column in place.
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
Trait Implementations§
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