pub struct Query<Q, U, D, R>{ /* private fields */ }
Expand description
A query non-destructively creates some value R
from references to a
U
. It can be called on values of any type T
, not just on values of type
U
, so it requires a default R
value for when it is called on values
which are not a T
.
This essentially lifts a FnMut(&U) -> R
into a for<T> FnMut(&T) -> R
.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<Q, U, D, R> Freeze for Query<Q, U, D, R>
impl<Q, U, D, R> RefUnwindSafe for Query<Q, U, D, R>where
D: RefUnwindSafe,
Q: RefUnwindSafe,
impl<Q, U, D, R> Send for Query<Q, U, D, R>
impl<Q, U, D, R> Sync for Query<Q, U, D, R>
impl<Q, U, D, R> Unpin for Query<Q, U, D, R>
impl<Q, U, D, R> UnwindSafe for Query<Q, U, D, R>where
D: UnwindSafe,
Q: UnwindSafe,
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