Struct tc_collection::table::TableSchema
source · pub struct TableSchema { /* private fields */ }
Expand description
The schema of a table
Implementations§
source§impl TableSchema
impl TableSchema
sourcepub fn try_cast_from_value(value: Value) -> TCResult<Self>
pub fn try_cast_from_value(value: Value) -> TCResult<Self>
Try to construct a TableSchema
from its Value
representation.
sourcepub fn columns(&self) -> impl Iterator<Item = &Id>
pub fn columns(&self) -> impl Iterator<Item = &Id>
Construct an iterator over the [Id
]s of the columns in this TableSchema
.
sourcepub fn len(&self) -> usize
pub fn len(&self) -> usize
Return the number of columns in this TableSchema
.
Trait Implementations§
source§impl AsType<TableSchema> for Schema
impl AsType<TableSchema> for Schema
source§fn as_type(&self) -> Option<&TableSchema>
fn as_type(&self) -> Option<&TableSchema>
Borrow this instance as an instance of
T
if possible.source§fn as_type_mut(&mut self) -> Option<&mut TableSchema>
fn as_type_mut(&mut self) -> Option<&mut TableSchema>
Borrow this instance mutably as an instance of
T
if possible.source§fn into_type(self) -> Option<TableSchema>
fn into_type(self) -> Option<TableSchema>
Convert this instance into an instance of
T
if possible.source§impl CastFrom<TableSchema> for Value
impl CastFrom<TableSchema> for Value
source§fn cast_from(schema: TableSchema) -> Self
fn cast_from(schema: TableSchema) -> Self
Cast an instance of
T
into an instance of Self
.source§impl Clone for TableSchema
impl Clone for TableSchema
source§fn clone(&self) -> TableSchema
fn clone(&self) -> TableSchema
Returns a copy 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 TableSchema
impl Debug for TableSchema
source§impl From<TableSchema> for Schema
impl From<TableSchema> for Schema
source§fn from(t: TableSchema) -> Self
fn from(t: TableSchema) -> Self
Converts to this type from the input type.
source§impl FromStream for TableSchema
impl FromStream for TableSchema
source§impl<'a, D: Digest> Hash<D> for &'a TableSchema
impl<'a, D: Digest> Hash<D> for &'a TableSchema
source§impl<'en> IntoStream<'en> for TableSchema
impl<'en> IntoStream<'en> for TableSchema
source§impl PartialEq for TableSchema
impl PartialEq for TableSchema
source§fn eq(&self, other: &TableSchema) -> bool
fn eq(&self, other: &TableSchema) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Schema for TableSchema
impl Schema for TableSchema
§type Index = BTreeSchema
type Index = BTreeSchema
The type of schema used by the indices which compose a [
Table
] with this Schema
source§fn auxiliary(&self) -> &[(String, Self::Index)]
fn auxiliary(&self) -> &[(String, Self::Index)]
Borrow the schemata of the auxiliary indices.
This is ordered so that the first index which matches a given
Range
will be used.impl Eq for TableSchema
impl StructuralPartialEq for TableSchema
Auto Trait Implementations§
impl RefUnwindSafe for TableSchema
impl Send for TableSchema
impl Sync for TableSchema
impl Unpin for TableSchema
impl UnwindSafe for TableSchema
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<F> Match for F
impl<F> Match for F
source§fn matches<T>(&self) -> boolwhere
T: TryCastFrom<Self>,
fn matches<T>(&self) -> boolwhere
T: TryCastFrom<Self>,
Returns
true
if self
can be cast into the target type T
.§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<F, T> TryCastFrom<F> for Twhere
T: CastFrom<F>,
impl<F, T> TryCastFrom<F> for Twhere
T: CastFrom<F>,
source§fn can_cast_from(_: &F) -> bool
fn can_cast_from(_: &F) -> bool
Test if
value
can be cast into Self
.source§fn opt_cast_from(f: F) -> Option<T>
fn opt_cast_from(f: F) -> Option<T>
Returns
Some(Self)
if the source value can be cast into Self
, otherwise None
.source§impl<F, T> TryCastInto<T> for Fwhere
T: TryCastFrom<F>,
impl<F, T> TryCastInto<T> for Fwhere
T: TryCastFrom<F>,
source§fn can_cast_into(&self) -> bool
fn can_cast_into(&self) -> bool
Test if
self
can be cast into T
.source§fn opt_cast_into(self) -> Option<T>
fn opt_cast_into(self) -> Option<T>
Returns
Some(T)
if self
can be cast into T
, otherwise None
.