Struct tc_table::TableSchema
source · [−]pub struct TableSchema { /* private fields */ }
Expand description
The schema of a Table
.
Implementations
sourceimpl TableSchema
impl TableSchema
sourcepub fn new<I: IntoIterator<Item = (Id, Vec<Id>)>>(
primary: IndexSchema,
indices: I
) -> Self
pub fn new<I: IntoIterator<Item = (Id, Vec<Id>)>>(
primary: IndexSchema,
indices: I
) -> Self
Construct a new Table
schema.
sourcepub fn indices(&self) -> &[(Id, Vec<Id>)]
pub fn indices(&self) -> &[(Id, Vec<Id>)]
Return a list of index names and the names of the columns they index.
sourcepub fn primary(&self) -> &IndexSchema
pub fn primary(&self) -> &IndexSchema
Return the IndexSchema
of this TableSchema
’s primary index.
Trait Implementations
sourceimpl CastFrom<TableSchema> for Value
impl CastFrom<TableSchema> for Value
sourcefn cast_from(schema: TableSchema) -> Self
fn cast_from(schema: TableSchema) -> Self
Cast an instance of T
into an instance of Self
.
sourceimpl Clone for TableSchema
impl Clone for TableSchema
sourcefn clone(&self) -> TableSchema
fn clone(&self) -> TableSchema
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Display for TableSchema
impl Display for TableSchema
sourceimpl From<IndexSchema> for TableSchema
impl From<IndexSchema> for TableSchema
sourcefn from(schema: IndexSchema) -> TableSchema
fn from(schema: IndexSchema) -> TableSchema
Converts to this type from the input type.
sourceimpl FromStream for TableSchema
impl FromStream for TableSchema
sourceimpl<'en> IntoStream<'en> for TableSchema
impl<'en> IntoStream<'en> for TableSchema
sourceimpl PartialEq<TableSchema> for TableSchema
impl PartialEq<TableSchema> for TableSchema
sourcefn 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 ==
. Read more
sourcefn ne(&self, other: &TableSchema) -> bool
fn ne(&self, other: &TableSchema) -> bool
This method tests for !=
.
sourceimpl TryCastFrom<Value> for TableSchema
impl TryCastFrom<Value> for TableSchema
sourcefn can_cast_from(value: &Value) -> bool
fn can_cast_from(value: &Value) -> bool
Test if value
can be cast into Self
.
sourcefn opt_cast_from(value: Value) -> Option<TableSchema>
fn opt_cast_from(value: Value) -> Option<TableSchema>
Returns Some(Self)
if the source value can be cast into Self
, otherwise None
.
sourcefn try_cast_from<Err, OnErr>(value: T, on_err: OnErr) -> Result<Self, Err> where
OnErr: FnOnce(&T) -> Err,
fn try_cast_from<Err, OnErr>(value: T, on_err: OnErr) -> Result<Self, Err> where
OnErr: FnOnce(&T) -> Err,
Returns Ok(Self)
if the source value can be cast into Self
, otherwise calls on_err
.
impl Eq for TableSchema
impl StructuralEq 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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<F> Match for F
impl<F> Match for F
sourcefn matches<T>(&self) -> bool where
T: TryCastFrom<Self>,
fn matches<T>(&self) -> bool where
T: TryCastFrom<Self>,
Returns true
if self
can be cast into the target type T
.
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
sourceimpl<F, T> TryCastFrom<F> for T where
T: CastFrom<F>,
impl<F, T> TryCastFrom<F> for T where
T: CastFrom<F>,
sourcefn can_cast_from(&F) -> bool
fn can_cast_from(&F) -> bool
Test if value
can be cast into Self
.
sourcefn 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
.
sourcefn try_cast_from<Err, OnErr>(value: T, on_err: OnErr) -> Result<Self, Err> where
OnErr: FnOnce(&T) -> Err,
fn try_cast_from<Err, OnErr>(value: T, on_err: OnErr) -> Result<Self, Err> where
OnErr: FnOnce(&T) -> Err,
Returns Ok(Self)
if the source value can be cast into Self
, otherwise calls on_err
.
sourceimpl<F, T> TryCastInto<T> for F where
T: TryCastFrom<F>,
impl<F, T> TryCastInto<T> for F where
T: TryCastFrom<F>,
sourcefn can_cast_into(&self) -> bool
fn can_cast_into(&self) -> bool
Test if self
can be cast into T
.
sourcefn 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
.
sourcefn try_cast_into<Err, OnErr>(self, on_err: OnErr) -> Result<T, Err> where
OnErr: FnOnce(&Self) -> Err,
fn try_cast_into<Err, OnErr>(self, on_err: OnErr) -> Result<T, Err> where
OnErr: FnOnce(&Self) -> Err,
Returns Ok(T)
if self
can be cast into T
, otherwise calls on_err
.