pub struct CollectionSchema {
pub name: String,
pub is_edge_collection: bool,
pub wait_for_sync: Option<bool>,
}
Expand description
Aragog schema representation of an ArangoDB
Collection.
This struct is meant to load/generate the schema file.
Fields§
§name: String
Collection name
is_edge_collection: bool
Defines if the collection a edge collection
wait_for_sync: Option<bool>
Defines if the collection requests wait for the operations to be written on disk
If set on true
the requests might be slower. By default, false
is used
Implementations§
Trait Implementations§
Source§impl Clone for CollectionSchema
impl Clone for CollectionSchema
Source§fn clone(&self) -> CollectionSchema
fn clone(&self) -> CollectionSchema
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 moreSource§impl Debug for CollectionSchema
impl Debug for CollectionSchema
Source§impl<'de> Deserialize<'de> for CollectionSchema
impl<'de> Deserialize<'de> for CollectionSchema
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl SchemaDatabaseOperation for CollectionSchema
impl SchemaDatabaseOperation for CollectionSchema
Source§type PoolType = Collection
type PoolType = Collection
The
arangors_lite
type to retrieve with the get
methodSource§fn apply_to_database<'life0, 'life1, 'async_trait>(
&'life0 self,
database: &'life1 Database,
silent: bool,
) -> Pin<Box<dyn Future<Output = Result<Option<Self::PoolType>, ClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn apply_to_database<'life0, 'life1, 'async_trait>(
&'life0 self,
database: &'life1 Database,
silent: bool,
) -> Pin<Box<dyn Future<Output = Result<Option<Self::PoolType>, ClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Applies (creates) the schema element to the database Read more
Source§fn drop<'life0, 'life1, 'async_trait>(
&'life0 self,
database: &'life1 Database,
) -> Pin<Box<dyn Future<Output = Result<(), ClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn drop<'life0, 'life1, 'async_trait>(
&'life0 self,
database: &'life1 Database,
) -> Pin<Box<dyn Future<Output = Result<(), ClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Deletes the schema element from the database.
Source§fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
database: &'life1 Database,
) -> Pin<Box<dyn Future<Output = Result<Self::PoolType, ClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
database: &'life1 Database,
) -> Pin<Box<dyn Future<Output = Result<Self::PoolType, ClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Retrieves the
arangors_lite
element from the schema elementSource§fn handle_error<T>(
result: Result<T, ClientError>,
silent: bool,
) -> Result<(), ClientError>
fn handle_error<T>( result: Result<T, ClientError>, silent: bool, ) -> Result<(), ClientError>
Utility method to allow “silent” error handling
Source§fn handle_pool_result(
result: Result<Self::PoolType, ClientError>,
silent: bool,
) -> Result<Option<Self::PoolType>, ClientError>
fn handle_pool_result( result: Result<Self::PoolType, ClientError>, silent: bool, ) -> Result<Option<Self::PoolType>, ClientError>
Factorisation of result and error handling for schema operations
Auto Trait Implementations§
impl Freeze for CollectionSchema
impl RefUnwindSafe for CollectionSchema
impl Send for CollectionSchema
impl Sync for CollectionSchema
impl Unpin for CollectionSchema
impl UnwindSafe for CollectionSchema
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