pub struct Row { /* private fields */ }Expand description
A row as the adapter returns it: values in the table’s column order.
Implementations§
Source§impl Row
impl Row
Sourcepub fn new(table: Arc<TableDef>, values: Vec<Value>) -> Self
pub fn new(table: Arc<TableDef>, values: Vec<Value>) -> Self
values must be in table’s column order. Adapters build rows with this.
pub fn table(&self) -> &Arc<TableDef> ⓘ
pub fn values(&self) -> &[Value]
pub fn into_values(self) -> Vec<Value>
pub fn value(&self, column: &str) -> Option<&Value>
pub fn get<T: ColumnValue>(&self, column: &str) -> Result<T, DecodeError>
Sourcepub fn to_client_json(&self) -> Map<String, Value>
pub fn to_client_json(&self) -> Map<String, Value>
The columns marked returned, as a camelCase JSON object: what clients see.
Trait Implementations§
Auto Trait Implementations§
impl Forget for Row
impl Freeze for Row
impl Move 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