#[non_exhaustive]pub struct TryGroupedByError<Child> {
pub grouped: Vec<Vec<Child>>,
pub ungrouped: Vec<Child>,
}
Expand description
A type of error which can be returned when attempting to group a list of records.
If a child record has a nullable foreign key, or is being grouped using a different relationship to the one that was used to query it, it may not be possible to find a parent record it should be grouped by.
When encountering these missing relationships, it may still be possible to group remaining records, but would affect the contents of the returned values. By extracting the contents of this struct, it is still possible to use these resulting groups, as well as any records that could not be grouped.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.grouped: Vec<Vec<Child>>
The collection of records which were successfully indexed against a parent record.
ungrouped: Vec<Child>
The collection of records that could not be indexed against a parent record.
Implementations§
Source§impl<Child> TryGroupedByError<Child>
impl<Child> TryGroupedByError<Child>
Trait Implementations§
Source§impl<Child: Clone> Clone for TryGroupedByError<Child>
impl<Child: Clone> Clone for TryGroupedByError<Child>
Source§fn clone(&self) -> TryGroupedByError<Child>
fn clone(&self) -> TryGroupedByError<Child>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<Child: Debug> Debug for TryGroupedByError<Child>
impl<Child: Debug> Debug for TryGroupedByError<Child>
Source§impl<Child: Hash> Hash for TryGroupedByError<Child>
impl<Child: Hash> Hash for TryGroupedByError<Child>
Source§impl<Child: Ord> Ord for TryGroupedByError<Child>
impl<Child: Ord> Ord for TryGroupedByError<Child>
Source§fn cmp(&self, other: &TryGroupedByError<Child>) -> Ordering
fn cmp(&self, other: &TryGroupedByError<Child>) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<Child: PartialEq> PartialEq for TryGroupedByError<Child>
impl<Child: PartialEq> PartialEq for TryGroupedByError<Child>
Source§impl<Child: PartialOrd> PartialOrd for TryGroupedByError<Child>
impl<Child: PartialOrd> PartialOrd for TryGroupedByError<Child>
impl<Child: Eq> Eq for TryGroupedByError<Child>
impl<Child> StructuralPartialEq for TryGroupedByError<Child>
Auto Trait Implementations§
impl<Child> Freeze for TryGroupedByError<Child>
impl<Child> RefUnwindSafe for TryGroupedByError<Child>where
Child: RefUnwindSafe,
impl<Child> Send for TryGroupedByError<Child>where
Child: Send,
impl<Child> Sync for TryGroupedByError<Child>where
Child: Sync,
impl<Child> Unpin for TryGroupedByError<Child>where
Child: Unpin,
impl<Child> UnwindSafe for TryGroupedByError<Child>where
Child: 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Converts
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
, which can then be
downcast
into Box<dyn ConcreteType>
where ConcreteType
implements Trait
.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Converts
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
, which can then be further
downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Converts
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Converts
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.