Struct dittolive_ditto::store::live_query::LiveQuery
source · pub struct LiveQuery {
pub query: Box,
pub collection_name: Box,
pub subscription: Option<Box<Subscription>>,
pub id: i64,
/* private fields */
}
Expand description
The type that is returned when calling observe_local
on a PendingCursorOperation
object. It handles the logic for calling the EventHandler
that is provided to
observe_local
calls. LiveQuery
objects must be kept in scope for as long as you wish to
have your event handler be called when there is an update to a document matching the query you
provide.
Fields§
§query: Box
§collection_name: Box
§subscription: Option<Box<Subscription>>
§id: i64
Implementations§
source§impl LiveQuery
impl LiveQuery
pub fn with_handler<F>( ditto: Weak<BoxedDitto>, query: Box, query_args: Option<Vec<u8>>, collection_name: Box, order_by: &[COrderByParam<'_>], limit: i32, offset: u32, event_handler: F ) -> Result<Self, DittoError>where F: EventHandler,
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for LiveQuery
impl Send for LiveQuery
impl Sync for LiveQuery
impl Unpin for LiveQuery
impl UnwindSafe for LiveQuery
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