pub struct DispatchedQuery { /* private fields */ }Implementations§
Source§impl DispatchedQuery
impl DispatchedQuery
Sourcepub fn the_query<T: 'static>(&self) -> Option<&T>
pub fn the_query<T: 'static>(&self) -> Option<&T>
Returns a reference (the real query) of the dispatched query
Sourcepub fn the_query_mut<T: 'static>(&mut self) -> Option<&mut T>
pub fn the_query_mut<T: 'static>(&mut self) -> Option<&mut T>
Returns a mutable reference to the query
Sourcepub fn take_query<T: 'static>(&mut self) -> Option<Box<T>>
pub fn take_query<T: 'static>(&mut self) -> Option<Box<T>>
Returns the dispatched query
Subsequent call to this method or the_query will return none
Sourcepub fn set_value<V: Send + Sync + 'static>(&self, value: V)
pub fn set_value<V: Send + Sync + 'static>(&self, value: V)
Sets the value that will be returned to the dispatcher
Sourcepub fn value<T: 'static>(&self) -> Option<&T>
pub fn value<T: 'static>(&self) -> Option<&T>
Returns the value set by the handler of the query
Sourcepub fn take_value<T: 'static>(&mut self) -> Option<Box<T>>
pub fn take_value<T: 'static>(&mut self) -> Option<Box<T>>
Returns the query’s result value
pub fn name(&self) -> &String
Sourcepub fn value_type_is<T>(&self) -> bool
pub fn value_type_is<T>(&self) -> bool
Compares the type of the value with the type of T
Trait Implementations§
Source§impl Debug for DispatchedQuery
impl Debug for DispatchedQuery
Source§impl<Q: DispatchableQuery + 'static> From<Q> for DispatchedQuery
impl<Q: DispatchableQuery + 'static> From<Q> for DispatchedQuery
Auto Trait Implementations§
impl !Freeze for DispatchedQuery
impl !RefUnwindSafe for DispatchedQuery
impl Send for DispatchedQuery
impl !Sync for DispatchedQuery
impl Unpin for DispatchedQuery
impl !UnwindSafe for DispatchedQuery
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