Struct dittolive_ditto::sync::Sync
source · [−]pub struct Sync { /* private fields */ }
Implementations
sourceimpl Sync
impl Sync
sourcepub fn subscriptions(
&self
) -> impl '_ + Deref<Target = SetArc<SyncSubscription>>
pub fn subscriptions(
&self
) -> impl '_ + Deref<Target = SetArc<SyncSubscription>>
Gets temporary access to the set of currently registered subscriptions.
A (read) lock is held until the return value is dropped: this means
that neither Self::register_subscription()
nor
SyncSubscription::cancel()
can make progress until this read
lock is released.
sourcepub fn register_subscription<Q>(
&self,
query: Q,
query_args: Option<QueryArguments>
) -> Result<Arc<SyncSubscription>, DittoError>where
Q: TryInto<Query, Error = DittoError>,
pub fn register_subscription<Q>(
&self,
query: Q,
query_args: Option<QueryArguments>
) -> Result<Arc<SyncSubscription>, DittoError>where
Q: TryInto<Query, Error = DittoError>,
Run the provided query on the device of connected peers and send the results of the query back to the local peer’s data store.
The returned SyncSubscription
object must be kept in scope
for as long as you want to keep receiving updates.
Use placeholders to incorporate values from the optional query_args
parameter into the query. The keys of the QueryArguments
object must
match the placeholders used within the query. You cannot use placeholders
in the FROM
clause.
Auto Trait Implementations
impl !RefUnwindSafe for Sync
impl Send for Sync
impl Sync for Sync
impl Unpin for Sync
impl !UnwindSafe for Sync
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> CompatExt for T
impl<T> CompatExt for T
fn compat_ref(&self) -> Compat<&T>
fn compat_ref(&self) -> Compat<&T>
Applies the [
Compat
] adapter by shared reference. Read morefn compat_mut(&mut self) -> Compat<&mut T>
fn compat_mut(&mut self) -> Compat<&mut T>
Applies the [
Compat
] adapter by mutable reference. Read more