pub struct Row(/* private fields */);
Expand description
A row that can contain a dynamic number of columns as long as each column has a distinct type
Implementations§
Source§impl Row
impl Row
Sourcepub fn upsert<T: Data>(&mut self, value: T) -> Option<T>
pub fn upsert<T: Data>(&mut self, value: T) -> Option<T>
update or insert the given column, return the old value
Sourcepub fn upsert_cell(&mut self, value: Box<dyn Cell>) -> Option<Box<dyn Any>>
pub fn upsert_cell(&mut self, value: Box<dyn Cell>) -> Option<Box<dyn Any>>
update or insert the given column, return the old value
Sourcepub fn extend<V: RowLike>(&mut self, value: V) -> Row
pub fn extend<V: RowLike>(&mut self, value: V) -> Row
Extends this row and replace existing columns
returns the replaces columns
Sourcepub fn extend_row(&mut self, row: Row) -> Row
pub fn extend_row(&mut self, row: Row) -> Row
Extends this row and replace existing columns
returns the replaces columns
Sourcepub fn match_grid(&self, grid: &Grid, partial: bool) -> bool
pub fn match_grid(&self, grid: &Grid, partial: bool) -> bool
returns true if the this grid contains these columns
if partial
is true, this grid should contains at least these columns.
if partial
is false this grid should contain exactly these columns
For tuples of Data, match grid panics if the same type is present more than once
Trait Implementations§
Source§impl<'a> IntoIterator for &'a Row
impl<'a> IntoIterator for &'a Row
Source§impl<'a> IntoIterator for &'a mut Row
impl<'a> IntoIterator for &'a mut 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 !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
Source§impl<T> Cell for Twhere
T: Data,
impl<T> Cell for Twhere
T: Data,
Source§fn cell_type_id(&self) -> TypeId
fn cell_type_id(&self) -> TypeId
type id of this Cell Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more