pub struct PgBytesRow {
pub column_info: Option<Arc<ColumnInfo>>,
/* private fields */
}Expand description
PostgreSQL row backed by a single shared payload buffer.
This avoids per-cell byte copies by storing one Bytes payload plus
column offsets into that payload.
Fields§
§column_info: Option<Arc<ColumnInfo>>Shared column metadata for decoding values by name or type.
Implementations§
Source§impl PgBytesRow
impl PgBytesRow
Sourcepub fn try_get<T: FromPg>(&self, idx: usize) -> Result<T, TypeError>
pub fn try_get<T: FromPg>(&self, idx: usize) -> Result<T, TypeError>
Decode a non-null column into any FromPg type using backend OID/format metadata.
Sourcepub fn try_get_opt<T: FromPg>(&self, idx: usize) -> Result<Option<T>, TypeError>
pub fn try_get_opt<T: FromPg>(&self, idx: usize) -> Result<Option<T>, TypeError>
Decode a possibly-null column into Option<T> using backend OID/format metadata.
Sourcepub fn try_get_by_name<T: FromPg>(&self, name: &str) -> Result<T, TypeError>
pub fn try_get_by_name<T: FromPg>(&self, name: &str) -> Result<T, TypeError>
Decode a non-null column by name into any FromPg type.
Sourcepub fn try_get_opt_by_name<T: FromPg>(
&self,
name: &str,
) -> Result<Option<T>, TypeError>
pub fn try_get_opt_by_name<T: FromPg>( &self, name: &str, ) -> Result<Option<T>, TypeError>
Decode a possibly-null column by name into Option<T>.
Sourcepub fn for_each_column<F>(&self, f: F)
pub fn for_each_column<F>(&self, f: F)
Visit each column as raw bytes without allocating.
Sourcepub fn column_index(&self, name: &str) -> Option<usize>
pub fn column_index(&self, name: &str) -> Option<usize>
Get column index by name.
Trait Implementations§
Source§impl Clone for PgBytesRow
impl Clone for PgBytesRow
Source§fn clone(&self) -> PgBytesRow
fn clone(&self) -> PgBytesRow
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PgBytesRow
impl Debug for PgBytesRow
Source§impl Default for PgBytesRow
impl Default for PgBytesRow
Source§fn default() -> PgBytesRow
fn default() -> PgBytesRow
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for PgBytesRow
impl RefUnwindSafe for PgBytesRow
impl Send for PgBytesRow
impl Sync for PgBytesRow
impl Unpin for PgBytesRow
impl UnsafeUnpin for PgBytesRow
impl UnwindSafe for PgBytesRow
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