pub struct Schema { /* private fields */ }Expand description
A schema defines the column names and their order in a row.
Implementations§
Source§impl Schema
impl Schema
Sourcepub fn from_arcs(columns: Vec<Arc<str>>) -> Self
pub fn from_arcs(columns: Vec<Arc<str>>) -> Self
Creates a new schema from Arc<str> column names (avoids allocation).
Sourcepub fn columns_arc(&self) -> &[Arc<str>]
pub fn columns_arc(&self) -> &[Arc<str>]
Returns the Arc<str> column names (for efficient cloning).
Sourcepub fn with_column(&self, name: impl Into<String>) -> Self
pub fn with_column(&self, name: impl Into<String>) -> Self
Creates a new schema with an additional column.
Trait Implementations§
impl Eq for Schema
impl StructuralPartialEq for Schema
Auto Trait Implementations§
impl Freeze for Schema
impl RefUnwindSafe for Schema
impl Send for Schema
impl Sync for Schema
impl Unpin for Schema
impl UnwindSafe for Schema
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