pub struct ApiDb<LocalDb: ClientSideDb> { /* private fields */ }
Implementations§
Source§impl<LocalDb: ClientSideDb> ApiDb<LocalDb>
impl<LocalDb: ClientSideDb> ApiDb<LocalDb>
pub fn watch_upload_queue(&self) -> Receiver<Vec<UploadId>>
pub fn on_connection_event( &self, cb: impl 'static + CrdbSyncFn<ConnectionEvent>, )
pub fn login(&self, url: Arc<String>, token: SessionToken)
pub fn logout(&self)
pub fn rename_session(&self, name: String) -> Receiver<Result<()>>
pub async fn current_session(&self) -> Result<Session>
pub async fn list_sessions(&self) -> Result<Vec<Session>>
pub fn disconnect_session( &self, session_ref: SessionRef, ) -> Receiver<Result<()>>
pub fn unsubscribe(&self, object_ids: HashSet<ObjectId>)
pub fn unsubscribe_query(&self, query_id: QueryId)
pub async fn create<T: Object>( &self, object_id: ObjectId, created_at: EventId, object: Arc<T>, subscribe: bool, ) -> Result<impl Future<Output = Result<()>>>
pub async fn submit<T: Object>( &self, object_id: ObjectId, event_id: EventId, event: Arc<T::Event>, subscribe: bool, ) -> Result<impl Future<Output = Result<()>>>
pub async fn get( &self, object_id: ObjectId, subscribe: bool, ) -> Result<ObjectData>
pub fn query<T: Object>( &self, query_id: QueryId, only_updated_since: Option<Updatedness>, subscribe: bool, query: Arc<Query>, ) -> impl Stream<Item = Result<(MaybeObject, Option<Updatedness>)>>
pub async fn get_binary(&self, binary_id: BinPtr) -> Result<Option<Arc<[u8]>>>
Auto Trait Implementations§
impl<LocalDb> Freeze for ApiDb<LocalDb>
impl<LocalDb> !RefUnwindSafe for ApiDb<LocalDb>
impl<LocalDb> Send for ApiDb<LocalDb>
impl<LocalDb> Sync for ApiDb<LocalDb>
impl<LocalDb> Unpin for ApiDb<LocalDb>
impl<LocalDb> !UnwindSafe for ApiDb<LocalDb>
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