Enum tc_collection::CollectionType
source · pub enum CollectionType {
BTree(BTreeType),
Table(TableType),
Tensor(TensorType),
}
Expand description
The Class
of a Collection
.
Variants§
Trait Implementations§
source§impl AsType<BTreeType> for CollectionType
impl AsType<BTreeType> for CollectionType
source§fn as_type_mut(&mut self) -> Option<&mut BTreeType>
fn as_type_mut(&mut self) -> Option<&mut BTreeType>
Borrow this instance mutably as an instance of
T
if possible.source§impl AsType<TableType> for CollectionType
impl AsType<TableType> for CollectionType
source§fn as_type_mut(&mut self) -> Option<&mut TableType>
fn as_type_mut(&mut self) -> Option<&mut TableType>
Borrow this instance mutably as an instance of
T
if possible.source§impl AsType<TensorType> for CollectionType
impl AsType<TensorType> for CollectionType
source§fn as_type(&self) -> Option<&TensorType>
fn as_type(&self) -> Option<&TensorType>
Borrow this instance as an instance of
T
if possible.source§fn as_type_mut(&mut self) -> Option<&mut TensorType>
fn as_type_mut(&mut self) -> Option<&mut TensorType>
Borrow this instance mutably as an instance of
T
if possible.source§fn into_type(self) -> Option<TensorType>
fn into_type(self) -> Option<TensorType>
Convert this instance into an instance of
T
if possible.source§impl Clone for CollectionType
impl Clone for CollectionType
source§fn clone(&self) -> CollectionType
fn clone(&self) -> CollectionType
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 CollectionType
impl Debug for CollectionType
source§impl From<BTreeType> for CollectionType
impl From<BTreeType> for CollectionType
source§impl From<TableType> for CollectionType
impl From<TableType> for CollectionType
source§impl From<TensorType> for CollectionType
impl From<TensorType> for CollectionType
source§fn from(t: TensorType) -> Self
fn from(t: TensorType) -> Self
Converts to this type from the input type.
source§impl NativeClass for CollectionType
impl NativeClass for CollectionType
source§impl PartialEq for CollectionType
impl PartialEq for CollectionType
source§fn eq(&self, other: &CollectionType) -> bool
fn eq(&self, other: &CollectionType) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<State> Route<State> for CollectionTypewhere
State: StateInstance + From<Collection<State::Txn, State::FE>> + From<Tensor<State::Txn, State::FE>>,
State::FE: DenseCacheFile + AsType<Node> + AsType<Node>,
Collection<State::Txn, State::FE>: TryCastFrom<State>,
TableFile<State::Txn, State::FE>: Persist<State::FE, Schema = TableSchema, Txn = State::Txn>,
Number: TryCastFrom<State>,
Tensor<State::Txn, State::FE>: TryCastFrom<State>,
Vec<Tensor<State::Txn, State::FE>>: TryCastFrom<State>,
Value: TryCastFrom<State>,
impl<State> Route<State> for CollectionTypewhere
State: StateInstance + From<Collection<State::Txn, State::FE>> + From<Tensor<State::Txn, State::FE>>,
State::FE: DenseCacheFile + AsType<Node> + AsType<Node>,
Collection<State::Txn, State::FE>: TryCastFrom<State>,
TableFile<State::Txn, State::FE>: Persist<State::FE, Schema = TableSchema, Txn = State::Txn>,
Number: TryCastFrom<State>,
Tensor<State::Txn, State::FE>: TryCastFrom<State>,
Vec<Tensor<State::Txn, State::FE>>: TryCastFrom<State>,
Value: TryCastFrom<State>,
impl Class for CollectionType
impl Copy for CollectionType
impl Eq for CollectionType
impl StructuralPartialEq for CollectionType
Auto Trait Implementations§
impl RefUnwindSafe for CollectionType
impl Send for CollectionType
impl Sync for CollectionType
impl Unpin for CollectionType
impl UnwindSafe for CollectionType
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<State, T> Public<State> for T
impl<State, T> Public<State> for T
fn get<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
txn: &'life1 <State as StateInstance>::Txn,
path: &'life2 [Id],
key: Value
) -> Pin<Box<dyn Future<Output = Result<State, TCError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
T: 'async_trait,
fn put<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
txn: &'life1 <State as StateInstance>::Txn,
path: &'life2 [Id],
key: Value,
value: State
) -> Pin<Box<dyn Future<Output = Result<(), TCError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
T: 'async_trait,
fn post<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
txn: &'life1 <State as StateInstance>::Txn,
path: &'life2 [Id],
params: Map<State>
) -> Pin<Box<dyn Future<Output = Result<State, TCError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
T: 'async_trait,
fn delete<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
txn: &'life1 <State as StateInstance>::Txn,
path: &'life2 [Id],
key: Value
) -> Pin<Box<dyn Future<Output = Result<(), TCError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
T: 'async_trait,
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
.