pub struct MappedDocuments<D, V>where
V: View,{
pub mappings: Vec<CollectionMap<<<V as View>::Collection as Collection>::PrimaryKey, <V as View>::Key, <V as View>::Value>>,
pub documents: BTreeMap<<<V as View>::Collection as Collection>::PrimaryKey, D>,
}Expand description
A collection of mappings and the associated documents.
Fields§
§mappings: Vec<CollectionMap<<<V as View>::Collection as Collection>::PrimaryKey, <V as View>::Key, <V as View>::Value>>The collection of mappings.
documents: BTreeMap<<<V as View>::Collection as Collection>::PrimaryKey, D>All associated documents by ID.
Documents can appear in a mapping query multiple times. As a result, they are stored separately to avoid duplication.
Implementations§
Source§impl<D, V> MappedDocuments<D, V>where
V: View,
impl<D, V> MappedDocuments<D, V>where
V: View,
Trait Implementations§
Source§impl<D, V> Debug for MappedDocuments<D, V>where
V: View,
<V as View>::Key: Debug,
<V as View>::Value: Debug,
D: Debug,
<<V as View>::Collection as Collection>::PrimaryKey: Debug,
impl<D, V> Debug for MappedDocuments<D, V>where
V: View,
<V as View>::Key: Debug,
<V as View>::Value: Debug,
D: Debug,
<<V as View>::Collection as Collection>::PrimaryKey: Debug,
Source§impl<'a, D, V> IntoIterator for &'a MappedDocuments<D, V>where
V: View,
impl<'a, D, V> IntoIterator for &'a MappedDocuments<D, V>where
V: View,
Source§type IntoIter = MappedDocumentsIter<'a, D, V>
type IntoIter = MappedDocumentsIter<'a, D, V>
Which kind of iterator are we turning this into?
Source§type Item = MappedDocument<'a, D, <V as View>::Key, <V as View>::Value>
type Item = MappedDocument<'a, D, <V as View>::Key, <V as View>::Value>
The type of the elements being iterated over.
Source§fn into_iter(self) -> <&'a MappedDocuments<D, V> as IntoIterator>::IntoIter
fn into_iter(self) -> <&'a MappedDocuments<D, V> as IntoIterator>::IntoIter
Creates an iterator from a value. Read more
Auto Trait Implementations§
impl<D, V> Freeze for MappedDocuments<D, V>
impl<D, V> RefUnwindSafe for MappedDocuments<D, V>where
<V as View>::Key: RefUnwindSafe,
<V as View>::Value: RefUnwindSafe,
<<V as View>::Collection as Collection>::PrimaryKey: RefUnwindSafe,
D: RefUnwindSafe,
impl<D, V> Send for MappedDocuments<D, V>where
D: Send,
impl<D, V> Sync for MappedDocuments<D, V>where
D: Sync,
impl<D, V> Unpin for MappedDocuments<D, V>where
<V as View>::Key: Unpin,
<V as View>::Value: Unpin,
<<V as View>::Collection as Collection>::PrimaryKey: Unpin,
impl<D, V> UnwindSafe for MappedDocuments<D, V>where
<<V as View>::Collection as Collection>::PrimaryKey: RefUnwindSafe + UnwindSafe,
D: RefUnwindSafe,
<V as View>::Key: UnwindSafe,
<V as View>::Value: UnwindSafe,
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more