Struct otter_api_tests::DenseSlotMap
source · [−]pub struct DenseSlotMap<K, V> where
K: Key, { /* private fields */ }
Expand description
Dense slot map, storage with stable unique keys.
See crate documentation for more details.
Implementations
sourceimpl<V> DenseSlotMap<DefaultKey, V>
impl<V> DenseSlotMap<DefaultKey, V>
sourcepub fn new() -> DenseSlotMap<DefaultKey, V>
pub fn new() -> DenseSlotMap<DefaultKey, V>
Construct a new, empty DenseSlotMap
.
Examples
let mut sm: DenseSlotMap<_, i32> = DenseSlotMap::new();
sourcepub fn with_capacity(capacity: usize) -> DenseSlotMap<DefaultKey, V>
pub fn with_capacity(capacity: usize) -> DenseSlotMap<DefaultKey, V>
Creates an empty DenseSlotMap
with the given capacity.
The slot map will not reallocate until it holds at least capacity
elements.
Examples
let mut sm: DenseSlotMap<_, i32> = DenseSlotMap::with_capacity(10);
sourceimpl<K, V> DenseSlotMap<K, V> where
K: Key,
impl<K, V> DenseSlotMap<K, V> where
K: Key,
sourcepub fn with_key() -> DenseSlotMap<K, V>
pub fn with_key() -> DenseSlotMap<K, V>
Constructs a new, empty DenseSlotMap
with a custom key type.
Examples
new_key_type! {
struct PositionKey;
}
let mut positions: DenseSlotMap<PositionKey, i32> = DenseSlotMap::with_key();
sourcepub fn with_capacity_and_key(capacity: usize) -> DenseSlotMap<K, V>
pub fn with_capacity_and_key(capacity: usize) -> DenseSlotMap<K, V>
Creates an empty DenseSlotMap
with the given capacity and a custom key
type.
The slot map will not reallocate until it holds at least capacity
elements.
Examples
new_key_type! {
struct MessageKey;
}
let mut messages = DenseSlotMap::with_capacity_and_key(3);
let welcome: MessageKey = messages.insert("Welcome");
let good_day = messages.insert("Good day");
let hello = messages.insert("Hello");
sourcepub fn len(&self) -> usize
pub fn len(&self) -> usize
Returns the number of elements in the slot map.
Examples
let mut sm = DenseSlotMap::with_capacity(10);
sm.insert("len() counts actual elements, not capacity");
let key = sm.insert("removed elements don't count either");
sm.remove(key);
assert_eq!(sm.len(), 1);
sourcepub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
Returns if the slot map is empty.
Examples
let mut sm = DenseSlotMap::new();
let key = sm.insert("dummy");
assert_eq!(sm.is_empty(), false);
sm.remove(key);
assert_eq!(sm.is_empty(), true);
sourcepub fn capacity(&self) -> usize
pub fn capacity(&self) -> usize
Returns the number of elements the DenseSlotMap
can hold without
reallocating.
Examples
let sm: DenseSlotMap<_, f64> = DenseSlotMap::with_capacity(10);
assert_eq!(sm.capacity(), 10);
sourcepub fn reserve(&mut self, additional: usize)
pub fn reserve(&mut self, additional: usize)
Reserves capacity for at least additional
more elements to be inserted
in the DenseSlotMap
. The collection may reserve more space to
avoid frequent reallocations.
Panics
Panics if the new allocation size overflows usize
.
Examples
let mut sm = DenseSlotMap::new();
sm.insert("foo");
sm.reserve(32);
assert!(sm.capacity() >= 33);
sourcepub fn contains_key(&self, key: K) -> bool
pub fn contains_key(&self, key: K) -> bool
sourcepub fn insert_with_key<F>(&mut self, f: F) -> K where
F: FnOnce(K) -> V,
pub fn insert_with_key<F>(&mut self, f: F) -> K where
F: FnOnce(K) -> V,
Inserts a value given by f
into the slot map. The key where the
value will be stored is passed into f
. This is useful to store values
that contain their own key.
Panics
Panics if the number of elements in the slot map equals 232 - 2.
Examples
let mut sm = DenseSlotMap::new();
let key = sm.insert_with_key(|k| (k, 20));
assert_eq!(sm[key], (key, 20));
sourcepub fn remove(&mut self, key: K) -> Option<V>
pub fn remove(&mut self, key: K) -> Option<V>
Removes a key from the slot map, returning the value at the key if the key was not previously removed.
Examples
let mut sm = DenseSlotMap::new();
let key = sm.insert(42);
assert_eq!(sm.remove(key), Some(42));
assert_eq!(sm.remove(key), None);
sourcepub fn retain<F>(&mut self, f: F) where
F: for<'_> FnMut(K, &mut V) -> bool,
pub fn retain<F>(&mut self, f: F) where
F: for<'_> FnMut(K, &mut V) -> bool,
Retains only the elements specified by the predicate.
In other words, remove all key-value pairs (k, v)
such that
f(k, &mut v)
returns false. This method invalidates any removed keys.
Examples
let mut sm = DenseSlotMap::new();
let k3 = sm.insert(2);
let k1 = sm.insert(0);
let k2 = sm.insert(1);
sm.retain(|key, val| key == k1 || *val == 1);
assert!(sm.contains_key(k1));
assert!(sm.contains_key(k2));
assert!(!sm.contains_key(k3));
assert_eq!(2, sm.len());
sourcepub fn clear(&mut self)
pub fn clear(&mut self)
Clears the slot map. Keeps the allocated memory for reuse.
Examples
let mut sm = DenseSlotMap::new();
for i in 0..10 {
sm.insert(i);
}
assert_eq!(sm.len(), 10);
sm.clear();
assert_eq!(sm.len(), 0);
sourcepub fn drain(&mut self) -> Drain<'_, K, V>ⓘNotable traits for Drain<'a, K, V>impl<'a, K, V> Iterator for Drain<'a, K, V> where
K: Key, type Item = (K, V);
pub fn drain(&mut self) -> Drain<'_, K, V>ⓘNotable traits for Drain<'a, K, V>impl<'a, K, V> Iterator for Drain<'a, K, V> where
K: Key, type Item = (K, V);
K: Key, type Item = (K, V);
Clears the slot map, returning all key-value pairs in arbitrary order as an iterator. Keeps the allocated memory for reuse.
When the iterator is dropped all elements in the slot map are removed,
even if the iterator was not fully consumed. If the iterator is not
dropped (using e.g. std::mem::forget
), only the elements that were
iterated over are removed.
Examples
let mut sm = DenseSlotMap::new();
let k = sm.insert(0);
let v: Vec<_> = sm.drain().collect();
assert_eq!(sm.len(), 0);
assert_eq!(v, vec![(k, 0)]);
sourcepub fn get(&self, key: K) -> Option<&V>
pub fn get(&self, key: K) -> Option<&V>
Returns a reference to the value corresponding to the key.
Examples
let mut sm = DenseSlotMap::new();
let key = sm.insert("bar");
assert_eq!(sm.get(key), Some(&"bar"));
sm.remove(key);
assert_eq!(sm.get(key), None);
sourcepub unsafe fn get_unchecked(&self, key: K) -> &V
pub unsafe fn get_unchecked(&self, key: K) -> &V
Returns a reference to the value corresponding to the key without version or bounds checking.
Safety
This should only be used if contains_key(key)
is true. Otherwise it is
potentially unsafe.
Examples
let mut sm = DenseSlotMap::new();
let key = sm.insert("bar");
assert_eq!(unsafe { sm.get_unchecked(key) }, &"bar");
sm.remove(key);
// sm.get_unchecked(key) is now dangerous!
sourcepub fn get_mut(&mut self, key: K) -> Option<&mut V>
pub fn get_mut(&mut self, key: K) -> Option<&mut V>
Returns a mutable reference to the value corresponding to the key.
Examples
let mut sm = DenseSlotMap::new();
let key = sm.insert(3.5);
if let Some(x) = sm.get_mut(key) {
*x += 3.0;
}
assert_eq!(sm[key], 6.5);
sourcepub unsafe fn get_unchecked_mut(&mut self, key: K) -> &mut V
pub unsafe fn get_unchecked_mut(&mut self, key: K) -> &mut V
Returns a mutable reference to the value corresponding to the key without version or bounds checking.
Safety
This should only be used if contains_key(key)
is true. Otherwise it is
potentially unsafe.
Examples
let mut sm = DenseSlotMap::new();
let key = sm.insert("foo");
unsafe { *sm.get_unchecked_mut(key) = "bar" };
assert_eq!(sm[key], "bar");
sm.remove(key);
// sm.get_unchecked_mut(key) is now dangerous!
sourcepub fn iter(&self) -> Iter<'_, K, V>ⓘNotable traits for Iter<'a, K, V>impl<'a, K, V> Iterator for Iter<'a, K, V> where
K: 'a + Key, type Item = (K, &'a V);
pub fn iter(&self) -> Iter<'_, K, V>ⓘNotable traits for Iter<'a, K, V>impl<'a, K, V> Iterator for Iter<'a, K, V> where
K: 'a + Key, type Item = (K, &'a V);
K: 'a + Key, type Item = (K, &'a V);
An iterator visiting all key-value pairs in arbitrary order. The
iterator element type is (K, &'a V)
.
Examples
let mut sm = DenseSlotMap::new();
let k0 = sm.insert(0);
let k1 = sm.insert(1);
let k2 = sm.insert(2);
let mut it = sm.iter();
for (k, v) in sm.iter() {
println!("key: {:?}, val: {}", k, v);
}
sourcepub fn iter_mut(&mut self) -> IterMut<'_, K, V>ⓘNotable traits for IterMut<'a, K, V>impl<'a, K, V> Iterator for IterMut<'a, K, V> where
K: 'a + Key, type Item = (K, &'a mut V);
pub fn iter_mut(&mut self) -> IterMut<'_, K, V>ⓘNotable traits for IterMut<'a, K, V>impl<'a, K, V> Iterator for IterMut<'a, K, V> where
K: 'a + Key, type Item = (K, &'a mut V);
K: 'a + Key, type Item = (K, &'a mut V);
An iterator visiting all key-value pairs in arbitrary order, with
mutable references to the values. The iterator element type is
(K, &'a mut V)
.
Examples
let mut sm = DenseSlotMap::new();
let k0 = sm.insert(10);
let k1 = sm.insert(20);
let k2 = sm.insert(30);
for (k, v) in sm.iter_mut() {
if k != k1 {
*v *= -1;
}
}
assert_eq!(sm[k0], -10);
assert_eq!(sm[k1], 20);
assert_eq!(sm[k2], -30);
sourcepub fn keys(&self) -> Keys<'_, K, V>ⓘNotable traits for Keys<'a, K, V>impl<'a, K, V> Iterator for Keys<'a, K, V> where
K: 'a + Key, type Item = K;
pub fn keys(&self) -> Keys<'_, K, V>ⓘNotable traits for Keys<'a, K, V>impl<'a, K, V> Iterator for Keys<'a, K, V> where
K: 'a + Key, type Item = K;
K: 'a + Key, type Item = K;
An iterator visiting all keys in arbitrary order. The iterator element type is K.
Examples
let mut sm = DenseSlotMap::new();
let k0 = sm.insert(10);
let k1 = sm.insert(20);
let k2 = sm.insert(30);
let keys: HashSet<_> = sm.keys().collect();
let check: HashSet<_> = vec![k0, k1, k2].into_iter().collect();
assert_eq!(keys, check);
sourcepub fn values(&self) -> Values<'_, K, V>ⓘNotable traits for Values<'a, K, V>impl<'a, K, V> Iterator for Values<'a, K, V> where
K: 'a + Key, type Item = &'a V;
pub fn values(&self) -> Values<'_, K, V>ⓘNotable traits for Values<'a, K, V>impl<'a, K, V> Iterator for Values<'a, K, V> where
K: 'a + Key, type Item = &'a V;
K: 'a + Key, type Item = &'a V;
An iterator visiting all values in arbitrary order. The iterator element
type is &'a V
.
Examples
let mut sm = DenseSlotMap::new();
let k0 = sm.insert(10);
let k1 = sm.insert(20);
let k2 = sm.insert(30);
let values: HashSet<_> = sm.values().collect();
let check: HashSet<_> = vec![&10, &20, &30].into_iter().collect();
assert_eq!(values, check);
sourcepub fn values_mut(&mut self) -> ValuesMut<'_, K, V>ⓘNotable traits for ValuesMut<'a, K, V>impl<'a, K, V> Iterator for ValuesMut<'a, K, V> where
K: 'a + Key, type Item = &'a mut V;
pub fn values_mut(&mut self) -> ValuesMut<'_, K, V>ⓘNotable traits for ValuesMut<'a, K, V>impl<'a, K, V> Iterator for ValuesMut<'a, K, V> where
K: 'a + Key, type Item = &'a mut V;
K: 'a + Key, type Item = &'a mut V;
An iterator visiting all values mutably in arbitrary order. The iterator
element type is &'a mut V
.
Examples
let mut sm = DenseSlotMap::new();
sm.insert(1);
sm.insert(2);
sm.insert(3);
sm.values_mut().for_each(|n| { *n *= 3 });
let values: HashSet<_> = sm.into_iter().map(|(_k, v)| v).collect();
let check: HashSet<_> = vec![3, 6, 9].into_iter().collect();
assert_eq!(values, check);
Trait Implementations
sourceimpl<I, T> ById for DenseSlotMap<I, T> where
I: IdForById + Key,
impl<I, T> ById for DenseSlotMap<I, T> where
I: IdForById + Key,
sourceimpl<K, V> Clone for DenseSlotMap<K, V> where
K: Clone + Key,
V: Clone,
impl<K, V> Clone for DenseSlotMap<K, V> where
K: Clone + Key,
V: Clone,
sourcefn clone(&self) -> DenseSlotMap<K, V>
fn clone(&self) -> DenseSlotMap<K, V>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<K, V> Default for DenseSlotMap<K, V> where
K: Key,
impl<K, V> Default for DenseSlotMap<K, V> where
K: Key,
sourcefn default() -> DenseSlotMap<K, V>
fn default() -> DenseSlotMap<K, V>
Returns the “default value” for a type. Read more
sourceimpl<'de, K, V> Deserialize<'de> for DenseSlotMap<K, V> where
K: Key,
V: Deserialize<'de>,
impl<'de, K, V> Deserialize<'de> for DenseSlotMap<K, V> where
K: Key,
V: Deserialize<'de>,
sourcefn deserialize<D>(
deserializer: D
) -> Result<DenseSlotMap<K, V>, <D as Deserializer<'de>>::Error> where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D
) -> Result<DenseSlotMap<K, V>, <D as Deserializer<'de>>::Error> where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl<K, V> Index<K> for DenseSlotMap<K, V> where
K: Key,
impl<K, V> Index<K> for DenseSlotMap<K, V> where
K: Key,
sourceimpl<K, V> IndexMut<K> for DenseSlotMap<K, V> where
K: Key,
impl<K, V> IndexMut<K> for DenseSlotMap<K, V> where
K: Key,
sourceimpl<'a, K, V> IntoIterator for &'a DenseSlotMap<K, V> where
K: 'a + Key,
impl<'a, K, V> IntoIterator for &'a DenseSlotMap<K, V> where
K: 'a + Key,
sourcefn into_iter(self) -> <&'a DenseSlotMap<K, V> as IntoIterator>::IntoIter
fn into_iter(self) -> <&'a DenseSlotMap<K, V> as IntoIterator>::IntoIter
Creates an iterator from a value. Read more
sourceimpl<K, V> IntoIterator for DenseSlotMap<K, V> where
K: Key,
impl<K, V> IntoIterator for DenseSlotMap<K, V> where
K: Key,
sourcefn into_iter(self) -> <DenseSlotMap<K, V> as IntoIterator>::IntoIter
fn into_iter(self) -> <DenseSlotMap<K, V> as IntoIterator>::IntoIter
Creates an iterator from a value. Read more
sourceimpl<'a, K, V> IntoIterator for &'a mut DenseSlotMap<K, V> where
K: 'a + Key,
impl<'a, K, V> IntoIterator for &'a mut DenseSlotMap<K, V> where
K: 'a + Key,
sourcefn into_iter(self) -> <&'a mut DenseSlotMap<K, V> as IntoIterator>::IntoIter
fn into_iter(self) -> <&'a mut DenseSlotMap<K, V> as IntoIterator>::IntoIter
Creates an iterator from a value. Read more
sourceimpl<K, V> Serialize for DenseSlotMap<K, V> where
K: Key,
V: Serialize,
impl<K, V> Serialize for DenseSlotMap<K, V> where
K: Key,
V: Serialize,
sourcefn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
S: Serializer,
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations
impl<K, V> RefUnwindSafe for DenseSlotMap<K, V> where
K: RefUnwindSafe,
V: RefUnwindSafe,
impl<K, V> Send for DenseSlotMap<K, V> where
K: Send,
V: Send,
impl<K, V> Sync for DenseSlotMap<K, V> where
K: Sync,
V: Sync,
impl<K, V> Unpin for DenseSlotMap<K, V> where
K: Unpin,
V: Unpin,
impl<K, V> UnwindSafe for DenseSlotMap<K, V> where
K: UnwindSafe,
V: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Downcast for T where
T: Any,
impl<T> Downcast for T where
T: Any,
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>ⓘNotable traits for Box<W, Global>impl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<R> Read for Box<R, Global> where
R: Read + ?Sized, impl<F, A> Future for Box<F, A> where
F: Future + Unpin + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
I: Iterator + ?Sized,
A: Allocator, type Item = <I as Iterator>::Item;
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>ⓘNotable traits for Box<W, Global>impl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<R> Read for Box<R, Global> where
R: Read + ?Sized, impl<F, A> Future for Box<F, A> where
F: Future + Unpin + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
I: Iterator + ?Sized,
A: Allocator, type Item = <I as Iterator>::Item;
W: Write + ?Sized, impl<R> Read for Box<R, Global> where
R: Read + ?Sized, impl<F, A> Future for Box<F, A> where
F: Future + Unpin + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
I: Iterator + ?Sized,
A: Allocator, type Item = <I as Iterator>::Item;
Convert Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
. Read more
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read more
fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert &Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read more
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert &mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s. Read more
impl<A> DynCastExt for A
impl<A> DynCastExt for A
fn dyn_cast<T>(
self
) -> Result<<A as DynCastExtHelper<T>>::Target, <A as DynCastExtHelper<T>>::Source> where
A: DynCastExtHelper<T>,
T: ?Sized,
fn dyn_cast<T>(
self
) -> Result<<A as DynCastExtHelper<T>>::Target, <A as DynCastExtHelper<T>>::Source> where
A: DynCastExtHelper<T>,
T: ?Sized,
Use this to cast from one trait object type to another. Read more
fn dyn_upcast<T>(self) -> <A as DynCastExtAdvHelper<T, T>>::Target where
A: DynCastExtAdvHelper<T, T, Source = <A as DynCastExtAdvHelper<T, T>>::Target>,
T: ?Sized,
fn dyn_upcast<T>(self) -> <A as DynCastExtAdvHelper<T, T>>::Target where
A: DynCastExtAdvHelper<T, T, Source = <A as DynCastExtAdvHelper<T, T>>::Target>,
T: ?Sized,
Use this to upcast a trait to one of its supertraits. Read more
fn dyn_cast_adv<F, T>(
self
) -> Result<<A as DynCastExtAdvHelper<F, T>>::Target, <A as DynCastExtAdvHelper<F, T>>::Source> where
A: DynCastExtAdvHelper<F, T>,
F: ?Sized,
T: ?Sized,
fn dyn_cast_adv<F, T>(
self
) -> Result<<A as DynCastExtAdvHelper<F, T>>::Target, <A as DynCastExtAdvHelper<F, T>>::Source> where
A: DynCastExtAdvHelper<F, T>,
F: ?Sized,
T: ?Sized,
fn dyn_cast_with_config<C>(
self
) -> Result<<A as DynCastExtAdvHelper<<C as DynCastConfig>::Source, <C as DynCastConfig>::Target>>::Target, <A as DynCastExtAdvHelper<<C as DynCastConfig>::Source, <C as DynCastConfig>::Target>>::Source> where
C: DynCastConfig,
A: DynCastExtAdvHelper<<C as DynCastConfig>::Source, <C as DynCastConfig>::Target>,
fn dyn_cast_with_config<C>(
self
) -> Result<<A as DynCastExtAdvHelper<<C as DynCastConfig>::Source, <C as DynCastConfig>::Target>>::Target, <A as DynCastExtAdvHelper<<C as DynCastConfig>::Source, <C as DynCastConfig>::Target>>::Source> where
C: DynCastConfig,
A: DynCastExtAdvHelper<<C as DynCastConfig>::Source, <C as DynCastConfig>::Target>,
Use this to cast from one trait object type to another. With this method the type parameter is a config type that uniquely specifies which cast should be preformed. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
fn instrument(self, span: Span) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
T: Future, type Output = <T as Future>::Output;
sourcefn in_current_span(self) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
fn in_current_span(self) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
T: Future, type Output = <T as Future>::Output;
sourceimpl<T> Serialize for T where
T: Serialize + ?Sized,
impl<T> Serialize for T where
T: Serialize + ?Sized,
fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<Ok, Error>
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T> where
T: Future, type Output = <T as Future>::Output;
where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T> where
T: Future, type Output = <T as Future>::Output;
where
S: Into<Dispatch>,
T: Future, type Output = <T as Future>::Output;
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T> where
T: Future, type Output = <T as Future>::Output;
fn with_current_subscriber(self) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T> where
T: Future, type Output = <T as Future>::Output;
T: Future, type Output = <T as Future>::Output;
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more