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: KThe 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>,
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>,
Sourcepub fn insert_with<F: FnOnce(K) -> T>(self, f: F) -> &'a mut T
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>
impl<'a, T, Extractor, K, S> Sync for VacantEntry<'a, T, Extractor, K, S>
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> 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