pub struct EntityLiveQuery(/* private fields */);Expand description
A local subscription that handles both reactor subscription and remote cleanup This is a type-erased version that can be used in the TContext trait
Whether the query keeps its node alive is a construction-time choice:
EntityLiveQuery::new holds the node strongly, EntityLiveQuery::new_weak_node does not.
Implementations§
Source§impl EntityLiveQuery
impl EntityLiveQuery
pub fn new<SE, PA>( node: &Node<SE, PA>, collection_id: CollectionId, args: MatchArgs, cdata: PA::ContextData, ) -> Result<Self, RetrievalError>
Sourcepub fn new_weak_node<SE, PA>(
node: &Node<SE, PA>,
collection_id: CollectionId,
args: MatchArgs,
cdata: PA::ContextData,
) -> Result<Self, RetrievalError>
pub fn new_weak_node<SE, PA>( node: &Node<SE, PA>, collection_id: CollectionId, args: MatchArgs, cdata: PA::ContextData, ) -> Result<Self, RetrievalError>
Create a LiveQuery that does NOT keep the node alive.
Used by PolicyAgent and other internal subscribers that should not create reference cycles (node → agent → livequery → node). Operations that need the node (activation, selection updates) fail with “Node has been dropped” once the node is gone.
pub fn map<R: View>(self) -> LiveQuery<R>
Sourcepub async fn wait_initialized(&self)
pub async fn wait_initialized(&self)
Wait for the LiveQuery to be fully initialized with initial states
pub fn update_selection( &self, new_selection: impl TryInto<Selection, Error = impl Into<RetrievalError>>, ) -> Result<(), RetrievalError>
pub async fn update_selection_wait( &self, new_selection: impl TryInto<Selection, Error = impl Into<RetrievalError>>, ) -> Result<(), RetrievalError>
pub fn error(&self) -> Read<Option<RetrievalError>>
pub fn query_id(&self) -> QueryId
pub fn selection(&self) -> Read<(Selection, u32)>
pub fn resultset(&self) -> EntityResultSet
Sourcepub fn weak(&self) -> WeakEntityLiveQuery
pub fn weak(&self) -> WeakEntityLiveQuery
Create a weak reference to this LiveQuery
Trait Implementations§
Source§impl Clone for EntityLiveQuery
impl Clone for EntityLiveQuery
Source§fn clone(&self) -> EntityLiveQuery
fn clone(&self) -> EntityLiveQuery
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 !RefUnwindSafe for EntityLiveQuery
impl !UnwindSafe for EntityLiveQuery
impl Freeze for EntityLiveQuery
impl Send for EntityLiveQuery
impl Sync for EntityLiveQuery
impl Unpin for EntityLiveQuery
impl UnsafeUnpin for EntityLiveQuery
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreimpl<T> ObserverBounds for T
Source§impl<T> StorageAccess<T> for T
impl<T> StorageAccess<T> for T
Source§fn as_borrowed(&self) -> &T
fn as_borrowed(&self) -> &T
Borrows the value.
Source§fn into_taken(self) -> T
fn into_taken(self) -> T
Takes the value.