pub struct CollectionSource<S: Store> { /* private fields */ }Implementations§
Source§impl<S: Store> CollectionSource<S>
impl<S: Store> CollectionSource<S>
pub fn new(store: Arc<S>, state: CollectionState) -> Self
pub fn with_definition<T>( store: Arc<S>, state: CollectionState, definition: &CollectionDefinition<T>, ) -> Self
pub async fn from_root<T>( store: Arc<S>, definition: &CollectionDefinition<T>, root: Option<&Cid>, ) -> Result<Self, CollectionError>
pub fn state(&self) -> &CollectionState
pub async fn get(&self, id: &str) -> Result<Option<Cid>, CollectionError>
pub async fn search( &self, index_name: &str, query: &str, options: SearchOptions, ) -> Result<Vec<SearchLinkResult>, CollectionError>
pub async fn get_index_link( &self, index_name: &str, key: &str, ) -> Result<Option<Cid>, CollectionError>
pub async fn query_index( &self, index_name: &str, prefix: Option<&str>, limit: Option<usize>, ) -> Result<Vec<CollectionIndexLinkResult>, CollectionError>
Auto Trait Implementations§
impl<S> Freeze for CollectionSource<S>
impl<S> RefUnwindSafe for CollectionSource<S>where
S: RefUnwindSafe,
impl<S> Send for CollectionSource<S>
impl<S> Sync for CollectionSource<S>
impl<S> Unpin for CollectionSource<S>
impl<S> UnsafeUnpin for CollectionSource<S>
impl<S> UnwindSafe for CollectionSource<S>where
S: RefUnwindSafe,
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