pub struct Row { /* private fields */ }Expand description
A Row is an ordered collection of (field_name, value) pairs. Supports access by index or by field name.
Implementations§
Source§impl Row
impl Row
Sourcepub fn new(fields: Vec<String>, values: Vec<Value>) -> Self
pub fn new(fields: Vec<String>, values: Vec<Value>) -> Self
Create a new Row from field names and values. Panics if lengths don’t match.
Sourcepub fn get_unchecked(&self, index: usize) -> &Value
pub fn get_unchecked(&self, index: usize) -> &Value
Get a field value by index, or panic if out of bounds.
Sourcepub fn get_by_name(&self, name: &str) -> Option<&Value>
pub fn get_by_name(&self, name: &str) -> Option<&Value>
Get a field value by name.
Sourcepub fn into_values(self) -> Vec<Value>
pub fn into_values(self) -> Vec<Value>
Convert into values.
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§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request