pub struct ColumnLayout { /* private fields */ }Expand description
Immutable layout information for a table’s columns.
Implementations§
Source§impl ColumnLayout
impl ColumnLayout
Sourcepub fn new(columns: Vec<ColumnMeta>) -> Self
pub fn new(columns: Vec<ColumnMeta>) -> Self
Builds a layout from ordered column metadata.
Sourcepub fn columns(&self) -> &[ColumnMeta]
pub fn columns(&self) -> &[ColumnMeta]
Sorted column metadata.
Sourcepub fn column_names(&self) -> &[String]
pub fn column_names(&self) -> &[String]
Column names in positional order.
Sourcepub fn column_indices(&self) -> &HashMap<String, usize>
pub fn column_indices(&self) -> &HashMap<String, usize>
Column name to positional index lookup table.
Sourcepub fn column_types(&self) -> &[ColumnType]
pub fn column_types(&self) -> &[ColumnType]
Column types in positional order.
Sourcepub fn column_count(&self) -> usize
pub fn column_count(&self) -> usize
Number of columns described by this layout.
Trait Implementations§
Source§impl Clone for ColumnLayout
impl Clone for ColumnLayout
Source§fn clone(&self) -> ColumnLayout
fn clone(&self) -> ColumnLayout
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 ColumnLayout
impl RefUnwindSafe for ColumnLayout
impl Send for ColumnLayout
impl Sync for ColumnLayout
impl Unpin for ColumnLayout
impl UnwindSafe for ColumnLayout
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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