pub enum Data<'a, T: Queryable> {
Ref(Pointer<'a, T>),
Refs(Vec<Pointer<'a, T>>),
Value(T),
Nothing,
}
Expand description
Represents the data that is being processed in the query. It can be a reference to a single object, a collection of references,
Variants§
Implementations§
Source§impl<'a, T: Queryable> Data<'a, T>
impl<'a, T: Queryable> Data<'a, T>
pub fn reduce(self, other: Data<'a, T>) -> Data<'a, T>
pub fn flat_map<F>(self, f: F) -> Data<'a, T>
Sourcepub fn ok_ref(self) -> Option<Vec<Pointer<'a, T>>>
pub fn ok_ref(self) -> Option<Vec<Pointer<'a, T>>>
Returns the inner value if it is a single reference. If it is a collection of references, it returns the first one. If it is a value, it returns None.
Sourcepub fn ok_val(self) -> Option<T>
pub fn ok_val(self) -> Option<T>
Returns the inner value if it is a single value. If it is a reference or a collection of references, it returns None.
pub fn new_ref(data: Pointer<'a, T>) -> Data<'a, T>
pub fn new_refs(data: Vec<Pointer<'a, T>>) -> Data<'a, T>
Trait Implementations§
impl<'a, T: Queryable> StructuralPartialEq for Data<'a, T>
Auto Trait Implementations§
impl<'a, T> Freeze for Data<'a, T>where
T: Freeze,
impl<'a, T> RefUnwindSafe for Data<'a, T>where
T: RefUnwindSafe,
impl<'a, T> Send for Data<'a, T>
impl<'a, T> Sync for Data<'a, T>where
T: Sync,
impl<'a, T> Unpin for Data<'a, T>where
T: Unpin,
impl<'a, T> UnwindSafe for Data<'a, T>where
T: UnwindSafe + RefUnwindSafe,
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