pub struct ColumnInfo {
pub name_to_index: HashMap<String, usize>,
pub oids: Vec<u32>,
pub formats: Vec<i16>,
}Expand description
Metadata about the columns returned by a query.
Maps column names to positional indices and stores OID / format
information so that PgRow values can be decoded correctly.
Fields§
§name_to_index: HashMap<String, usize>Lookup table from column name to zero-based index.
oids: Vec<u32>PostgreSQL type OIDs, one per column.
formats: Vec<i16>Wire format codes (0 = text, 1 = binary), one per column.
Implementations§
Source§impl ColumnInfo
impl ColumnInfo
Sourcepub fn from_fields(fields: &[FieldDescription]) -> Self
pub fn from_fields(fields: &[FieldDescription]) -> Self
Build column metadata from the RowDescription field list
returned by the backend after a query.
Trait Implementations§
Source§impl Clone for ColumnInfo
impl Clone for ColumnInfo
Source§fn clone(&self) -> ColumnInfo
fn clone(&self) -> ColumnInfo
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 moreAuto Trait Implementations§
impl Freeze for ColumnInfo
impl RefUnwindSafe for ColumnInfo
impl Send for ColumnInfo
impl Sync for ColumnInfo
impl Unpin for ColumnInfo
impl UnsafeUnpin for ColumnInfo
impl UnwindSafe for ColumnInfo
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