Struct json_ld::object::node::Multiset

source ·
pub struct Multiset<T, S = DeterministicHasherBuilder> { /* private fields */ }
Expand description

Multi-set of values.

Implementations§

source§

impl<T, S> Multiset<T, S>

source

pub fn new() -> Multiset<T, S>where S: Default,

source

pub fn with_capacity(cap: usize) -> Multiset<T, S>where S: Default,

source

pub fn len(&self) -> usize

source

pub fn is_empty(&self) -> bool

source

pub fn contains(&self, value: &T) -> boolwhere T: PartialEq<T>,

source

pub fn iter(&self) -> Iter<'_, T>

source

pub fn iter_mut(&mut self) -> IterMut<'_, T>

source

pub fn as_slice(&self) -> &[T]

source§

impl<T, S> Multiset<T, S>where T: Hash, S: BuildHasher,

source

pub fn singleton(value: T) -> Multiset<T, S>where S: Default,

source

pub fn insert(&mut self, value: T)

source

pub fn insert_unique(&mut self, value: T) -> boolwhere T: PartialEq<T>,

Trait Implementations§

source§

impl<T, S> Clone for Multiset<T, S>where T: Clone, S: Clone,

source§

fn clone(&self) -> Multiset<T, S>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<T, S> Default for Multiset<T, S>where S: Default,

source§

fn default() -> Multiset<T, S>

Returns the “default value” for a type. Read more
source§

impl<T, S> Extend<T> for Multiset<T, S>where T: Hash, S: BuildHasher,

source§

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

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
source§

impl<T, S> FromIterator<T> for Multiset<T, S>where T: Hash, S: Default + BuildHasher,

source§

fn from_iter<I>(iter: I) -> Multiset<T, S>where I: IntoIterator<Item = T>,

Creates a value from an iterator. Read more
source§

impl<T, S> Hash for Multiset<T, S>where T: Hash, S: BuildHasher,

source§

fn hash<H>(&self, state: &mut H)where H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl<'a, T, S> IntoIterator for &'a Multiset<T, S>

§

type Item = &'a T

The type of the elements being iterated over.
§

type IntoIter = Iter<'a, T>

Which kind of iterator are we turning this into?
source§

fn into_iter(self) -> <&'a Multiset<T, S> as IntoIterator>::IntoIter

Creates an iterator from a value. Read more
source§

impl<'a, T, S> IntoIterator for &'a mut Multiset<T, S>

§

type Item = &'a mut T

The type of the elements being iterated over.
§

type IntoIter = IterMut<'a, T>

Which kind of iterator are we turning this into?
source§

fn into_iter(self) -> <&'a mut Multiset<T, S> as IntoIterator>::IntoIter

Creates an iterator from a value. Read more
source§

impl<T, S> IntoIterator for Multiset<T, S>

§

type Item = T

The type of the elements being iterated over.
§

type IntoIter = IntoIter<T, Global>

Which kind of iterator are we turning this into?
source§

fn into_iter(self) -> <Multiset<T, S> as IntoIterator>::IntoIter

Creates an iterator from a value. Read more
source§

impl<T, S, M, N> IntoJsonWithContextMeta<M, N> for Multiset<T, S>where T: IntoJsonWithContext<M, N>,

source§

fn into_json_meta_with(self, meta: M, vocabulary: &N) -> Meta<Value<M>, M>

source§

impl<T, U, S, P> PartialEq<Multiset<U, P>> for Multiset<T, S>where T: PartialEq<U>,

source§

fn eq(&self, other: &Multiset<U, P>) -> 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.
source§

impl<T, S> StrippedHash for Multiset<T, S>where T: StrippedHash, S: BuildHasher,

source§

fn stripped_hash<H>(&self, state: &mut H)where H: Hasher,

source§

impl<T, U, S, P> StrippedPartialEq<Multiset<U, P>> for Multiset<T, S>where T: StrippedPartialEq<U>,

source§

fn stripped_eq(&self, other: &Multiset<U, P>) -> bool

source§

impl<T, S> Eq for Multiset<T, S>where T: Eq,

source§

impl<T, S> StrippedEq for Multiset<T, S>where T: StrippedEq,

Auto Trait Implementations§

§

impl<T, S> RefUnwindSafe for Multiset<T, S>where S: RefUnwindSafe, T: RefUnwindSafe,

§

impl<T, S> Send for Multiset<T, S>where S: Send, T: Send,

§

impl<T, S> Sync for Multiset<T, S>where S: Sync, T: Sync,

§

impl<T, S> Unpin for Multiset<T, S>where S: Unpin, T: Unpin,

§

impl<T, S> UnwindSafe for Multiset<T, S>where S: UnwindSafe, T: 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
source§

impl<T> At for T

source§

fn at<M>(self, metadata: M) -> Meta<T, M>

Wraps self inside a Meta<Self, M> using the given metadata. Read more
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<T> BorrowStripped for T

source§

fn stripped(&self) -> &Stripped<T>

source§

impl<T> BorrowUnordered for T

source§

fn unordered(&self) -> &Unordered<T>

§

impl<T> CallHasher for Twhere T: Hash + ?Sized,

§

default fn get_hash<H, B>(value: &H, build_hasher: &B) -> u64where H: Hash + ?Sized, B: BuildHasher,

source§

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

source§

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

§

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
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.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, C> FromWithContext<T, C> for T

source§

fn from_with(value: T, _context: &C) -> T

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, U, C> IntoWithContext<U, C> for Twhere U: FromWithContext<T, C>,

source§

fn into_with(self, context: &C) -> U

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<T> ToOwned for T

§

type Owned = T

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, C> TryFromWithContext<U, C> for Twhere U: IntoWithContext<T, C>,

§

type Error = Infallible

source§

fn try_from_with( value: U, context: &C ) -> Result<T, <T as TryFromWithContext<U, C>>::Error>

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.
source§

impl<T, U, C> TryIntoWithContext<U, C> for Twhere U: TryFromWithContext<T, C>,

§

type Error = <U as TryFromWithContext<T, C>>::Error

source§

fn try_into_with( self, context: &C ) -> Result<U, <T as TryIntoWithContext<U, C>>::Error>

source§

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

source§

fn with<C>(&self, context: C) -> Contextual<&T, C>

source§

fn into_with<C>(self, context: C) -> Contextual<T, C>