pub struct Query<P, T> { /* private fields */ }Expand description
One query subscription with its parameter versions.
Implementations§
Source§impl<P: Clone, T: Clone> Query<P, T>
impl<P: Clone, T: Clone> Query<P, T>
pub fn new() -> Self
pub fn state(&self) -> &Resource<T>
pub fn params(&self) -> Option<&P>
Sourcepub fn request(&mut self, params: P) -> Ticket
pub fn request(&mut self, params: P) -> Ticket
Ask for params. The previous request is cancelled; data already
shown stays visible while the new request loads.
Sourcepub fn resolve(
&mut self,
ticket: &Ticket,
result: Result<T, CommandError>,
) -> Resolution
pub fn resolve( &mut self, ticket: &Ticket, result: Result<T, CommandError>, ) -> Resolution
A provider answered ticket. Only the current version is applied.
Trait Implementations§
Auto Trait Implementations§
impl<P, T> Freeze for Query<P, T>
impl<P, T> RefUnwindSafe for Query<P, T>
impl<P, T> Send for Query<P, T>
impl<P, T> Sync for Query<P, T>
impl<P, T> Unpin for Query<P, T>
impl<P, T> UnsafeUnpin for Query<P, T>
impl<P, T> UnwindSafe for Query<P, T>
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