Struct bonsaidb::core::schema::view::map::Map

pub struct Map<K = (), V = ()> {
    pub source: Header,
    pub key: K,
    pub value: V,
}
Expand description

A document’s entry in a View’s mappings.

Fields§

§source: Header

The header of the document that emitted this entry.

§key: K

The key used to index the View.

§value: V

An associated value stored in the view.

Implementations§

§

impl<K, V> Map<K, V>

pub const fn new(source: Header, key: K, value: V) -> Map<K, V>

Creates a new Map entry for the document with id source.

Trait Implementations§

§

impl<K, V> Debug for Map<K, V>where K: Debug, V: Debug,

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<K, V> Extend<Map<K, V>> for Mappings<K, V>

§

fn extend<T>(&mut self, iter: T)where T: IntoIterator<Item = Map<K, V>>,

Extends a collection with the contents of an iterator. Read more
source§

fn extend_one(&mut self, item: A)

🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
source§

fn extend_reserve(&mut self, additional: usize)

🔬This is a nightly-only experimental API. (extend_one)
Reserves capacity in a collection for the given number of additional elements. Read more
§

impl<K, V> FromIterator<Map<K, V>> for Mappings<K, V>

§

fn from_iter<T>(iter: T) -> Mappings<K, V>where T: IntoIterator<Item = Map<K, V>>,

Creates a value from an iterator. Read more
§

impl<K, V> PartialEq<Map<K, V>> for Map<K, V>where K: PartialEq<K>, V: PartialEq<V>,

§

fn eq(&self, other: &Map<K, V>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
§

impl<K, V> Eq for Map<K, V>where K: Eq, V: Eq,

§

impl<K, V> StructuralEq for Map<K, V>

§

impl<K, V> StructuralPartialEq for Map<K, V>

Auto Trait Implementations§

§

impl<K, V> RefUnwindSafe for Map<K, V>where K: RefUnwindSafe, V: RefUnwindSafe,

§

impl<K, V> Send for Map<K, V>where K: Send, V: Send,

§

impl<K, V> Sync for Map<K, V>where K: Sync, V: Sync,

§

impl<K, V> Unpin for Map<K, V>where K: Unpin, V: Unpin,

§

impl<K, V> UnwindSafe for Map<K, V>where K: UnwindSafe, V: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere T: 'a,

§

fn implicit( self, class: Class, constructed: bool, tag: u32 ) -> TaggedParser<'a, Implicit, Self, E>

source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
§

impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more