pub struct CollectionDefinition<T> { /* private fields */ }Implementations§
Source§impl<T> CollectionDefinition<T>
impl<T> CollectionDefinition<T>
pub fn new(get_id: impl Fn(&T) -> String + Send + Sync + 'static) -> Self
pub fn with_schema(self, schema: CollectionSchema<T>) -> Self
pub fn schema(&self) -> Option<&CollectionSchema<T>>
pub fn with_published_schema( self, published_schema: CollectionPublishedSchema, ) -> Self
pub fn published_schema(&self) -> Option<&CollectionPublishedSchema>
pub fn with_key_index( self, name: impl Into<String>, keys: impl Fn(&T) -> Vec<String> + Send + Sync + 'static, ) -> Self
pub fn with_search_index( self, index: CollectionSearchIndexDefinition<T>, ) -> Self
pub fn key_indexes(&self) -> &[CollectionKeyIndexDefinition<T>]
pub fn search_indexes(&self) -> &[CollectionSearchIndexDefinition<T>]
Trait Implementations§
Source§impl<T: Clone> Clone for CollectionDefinition<T>
impl<T: Clone> Clone for CollectionDefinition<T>
Source§fn clone(&self) -> CollectionDefinition<T>
fn clone(&self) -> CollectionDefinition<T>
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 moreAuto Trait Implementations§
impl<T> Freeze for CollectionDefinition<T>
impl<T> !RefUnwindSafe for CollectionDefinition<T>
impl<T> Send for CollectionDefinition<T>
impl<T> Sync for CollectionDefinition<T>
impl<T> Unpin for CollectionDefinition<T>
impl<T> UnsafeUnpin for CollectionDefinition<T>
impl<T> !UnwindSafe for CollectionDefinition<T>
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