VacantEntry

Struct VacantEntry 

Source
pub struct VacantEntry<'a, T: 'a, Extractor, K, S> {
    pub set: &'a mut KeyedSet<T, Extractor, S>,
    pub key: K,
}
Expand description

A vacant entry into a KeyedSet

Fields§

§set: &'a mut KeyedSet<T, Extractor, S>

The inner set

§key: K

The key fort he entry.

Implementations§

Source§

impl<'a, K, T, Extractor, S> VacantEntry<'a, T, Extractor, K, S>
where S: BuildHasher, for<'z> Extractor: KeyExtractor<'z, T>, for<'z, 'b> <Extractor as KeyExtractor<'z, T>>::Key: PartialEq<<Extractor as KeyExtractor<'b, T>>::Key>,

Source

pub fn insert_with<F: FnOnce(K) -> T>(self, f: F) -> &'a mut T

Inserts a value constructed from the entry’s key using f.

Auto Trait Implementations§

§

impl<'a, T, Extractor, K, S> Freeze for VacantEntry<'a, T, Extractor, K, S>
where K: Freeze,

§

impl<'a, T, Extractor, K, S> RefUnwindSafe for VacantEntry<'a, T, Extractor, K, S>

§

impl<'a, T, Extractor, K, S> Send for VacantEntry<'a, T, Extractor, K, S>
where K: Send, S: Send, Extractor: Send, T: Send,

§

impl<'a, T, Extractor, K, S> Sync for VacantEntry<'a, T, Extractor, K, S>
where K: Sync, S: Sync, Extractor: Sync, T: Sync,

§

impl<'a, T, Extractor, K, S> Unpin for VacantEntry<'a, T, Extractor, K, S>
where K: Unpin,

§

impl<'a, T, Extractor, K, S> !UnwindSafe for VacantEntry<'a, T, Extractor, K, S>

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where 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> TryFrom<U> for T
where U: Into<T>,

Source§

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 T
where U: TryFrom<T>,

Source§

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.