Struct veloren_rtsim::data::npc::Npcs
source · pub struct Npcs {
pub uid_counter: u64,
pub npcs: HopSlotMap<NpcId, Npc>,
pub mounts: NpcLinks,
pub npc_grid: Grid<GridCell>,
pub character_map: HashMap<Vec2<i32>, Vec<(CharacterId, Vec3<f32>)>>,
}
Fields§
§uid_counter: u64
§npcs: HopSlotMap<NpcId, Npc>
§mounts: NpcLinks
§npc_grid: Grid<GridCell>
§character_map: HashMap<Vec2<i32>, Vec<(CharacterId, Vec3<f32>)>>
Implementations§
Methods from Deref<Target = HopSlotMap<NpcId, Npc>>§
sourcepub fn len(&self) -> usize
pub fn len(&self) -> usize
Returns the number of elements in the slot map.
§Examples
let mut sm = HopSlotMap::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 = HopSlotMap::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 HopSlotMap
can hold without
reallocating.
§Examples
let sm: HopSlotMap<_, f64> = HopSlotMap::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 HopSlotMap
. The collection may reserve more space to
avoid frequent reallocations.
§Panics
Panics if the new allocation size overflows usize
.
§Examples
let mut sm = HopSlotMap::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) -> Kwhere
F: FnOnce(K) -> V,
pub fn insert_with_key<F>(&mut self, f: F) -> Kwhere
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 = HopSlotMap::new();
let key = sm.insert_with_key(|k| (k, 20));
assert_eq!(sm[key], (key, 20));
sourcepub fn try_insert_with_key<F, E>(&mut self, f: F) -> Result<K, E>
pub fn try_insert_with_key<F, E>(&mut self, f: F) -> Result<K, E>
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.
If f
returns Err
, this method returns the error. The slotmap is untouched.
§Panics
Panics if the number of elements in the slot map equals 232 - 2.
§Examples
let mut sm = HopSlotMap::new();
let key = sm.try_insert_with_key::<_, ()>(|k| Ok((k, 20))).unwrap();
assert_eq!(sm[key], (key, 20));
sm.try_insert_with_key::<_, ()>(|k| Err(())).unwrap_err();
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 = HopSlotMap::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)
pub fn retain<F>(&mut self, f: F)
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 = HopSlotMap::new();
let k1 = sm.insert(0);
let k2 = sm.insert(1);
let k3 = sm.insert(2);
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 = HopSlotMap::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>
pub fn drain(&mut self) -> Drain<'_, 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 = HopSlotMap::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 = HopSlotMap::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
dangerous undefined behavior.
§Examples
let mut sm = HopSlotMap::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 = HopSlotMap::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
dangerous undefined behavior.
§Examples
let mut sm = HopSlotMap::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 get_disjoint_mut<const N: usize>(
&mut self,
keys: [K; N],
) -> Option<[&mut V; N]>
pub fn get_disjoint_mut<const N: usize>( &mut self, keys: [K; N], ) -> Option<[&mut V; N]>
Returns mutable references to the values corresponding to the given
keys. All keys must be valid and disjoint, otherwise None
is
returned.
Requires at least stable Rust version 1.51.
§Examples
let mut sm = HopSlotMap::new();
let ka = sm.insert("butter");
let kb = sm.insert("apples");
let kc = sm.insert("charlie");
sm.remove(kc); // Make key c invalid.
assert_eq!(sm.get_disjoint_mut([ka, kb, kc]), None); // Has invalid key.
assert_eq!(sm.get_disjoint_mut([ka, ka]), None); // Not disjoint.
let [a, b] = sm.get_disjoint_mut([ka, kb]).unwrap();
std::mem::swap(a, b);
assert_eq!(sm[ka], "apples");
assert_eq!(sm[kb], "butter");
sourcepub unsafe fn get_disjoint_unchecked_mut<const N: usize>(
&mut self,
keys: [K; N],
) -> [&mut V; N]
pub unsafe fn get_disjoint_unchecked_mut<const N: usize>( &mut self, keys: [K; N], ) -> [&mut V; N]
Returns mutable references to the values corresponding to the given keys. All keys must be valid and disjoint.
Requires at least stable Rust version 1.51.
§Safety
This should only be used if contains_key(key)
is true for every given
key and no two keys are equal. Otherwise it is potentially unsafe.
§Examples
let mut sm = HopSlotMap::new();
let ka = sm.insert("butter");
let kb = sm.insert("apples");
let [a, b] = unsafe { sm.get_disjoint_unchecked_mut([ka, kb]) };
std::mem::swap(a, b);
assert_eq!(sm[ka], "apples");
assert_eq!(sm[kb], "butter");
sourcepub fn iter(&self) -> Iter<'_, K, V>
pub fn iter(&self) -> Iter<'_, K, V>
An iterator visiting all key-value pairs in arbitrary order. The
iterator element type is (K, &'a V)
.
§Examples
let mut sm = HopSlotMap::new();
let k0 = sm.insert(0);
let k1 = sm.insert(1);
let k2 = sm.insert(2);
for (k, v) in sm.iter() {
println!("key: {:?}, val: {}", k, v);
}
sourcepub fn iter_mut(&mut self) -> IterMut<'_, K, V>
pub fn iter_mut(&mut self) -> IterMut<'_, K, 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 = HopSlotMap::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>
pub fn keys(&self) -> Keys<'_, K, V>
An iterator visiting all keys in arbitrary order. The iterator element
type is K
.
§Examples
let mut sm = HopSlotMap::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>
pub fn values(&self) -> Values<'_, K, V>
An iterator visiting all values in arbitrary order. The iterator element
type is &'a V
.
§Examples
let mut sm = HopSlotMap::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>
pub fn values_mut(&mut self) -> ValuesMut<'_, K, V>
An iterator visiting all values mutably in arbitrary order. The iterator
element type is &'a mut V
.
§Examples
let mut sm = HopSlotMap::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§
source§impl<'de> Deserialize<'de> for Npcs
impl<'de> Deserialize<'de> for Npcs
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for Npcs
impl !RefUnwindSafe for Npcs
impl Send for Npcs
impl Sync for Npcs
impl Unpin for Npcs
impl !UnwindSafe for Npcs
Blanket Implementations§
§impl<T> AccessMut for T
impl<T> AccessMut for T
§fn access_mut(&mut self) -> &mut <T as Deref>::Target
fn access_mut(&mut self) -> &mut <T as Deref>::Target
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
source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)§impl<T> Conv for T
impl<T> Conv for T
§impl<C, M> ConvertSaveload<M> for C
impl<C, M> ConvertSaveload<M> for C
§type Error = Infallible
type Error = Infallible
§fn convert_into<F>(
&self,
_: F,
) -> Result<<C as ConvertSaveload<M>>::Data, <C as ConvertSaveload<M>>::Error>
fn convert_into<F>( &self, _: F, ) -> Result<<C as ConvertSaveload<M>>::Data, <C as ConvertSaveload<M>>::Error>
Data
) using
entity to marker mapping function§fn convert_from<F>(
data: <C as ConvertSaveload<M>>::Data,
_: F,
) -> Result<C, <C as ConvertSaveload<M>>::Error>
fn convert_from<F>( data: <C as ConvertSaveload<M>>::Data, _: F, ) -> Result<C, <C as ConvertSaveload<M>>::Error>
Data
) using
entity to marker mapping function§impl<T> FmtForward for T
impl<T> FmtForward for T
§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self
to use its Binary
implementation when Debug
-formatted.§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self
to use its Display
implementation when
Debug
-formatted.§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self
to use its LowerExp
implementation when
Debug
-formatted.§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self
to use its LowerHex
implementation when
Debug
-formatted.§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self
to use its Octal
implementation when Debug
-formatted.§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self
to use its Pointer
implementation when
Debug
-formatted.§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self
to use its UpperExp
implementation when
Debug
-formatted.§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self
to use its UpperHex
implementation when
Debug
-formatted.§fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§impl<Src, Dst> LosslessTryInto<Dst> for Srcwhere
Dst: LosslessTryFrom<Src>,
impl<Src, Dst> LosslessTryInto<Dst> for Srcwhere
Dst: LosslessTryFrom<Src>,
source§fn lossless_try_into(self) -> Option<Dst>
fn lossless_try_into(self) -> Option<Dst>
source§impl<Src, Dst> LossyInto<Dst> for Srcwhere
Dst: LossyFrom<Src>,
impl<Src, Dst> LossyInto<Dst> for Srcwhere
Dst: LossyFrom<Src>,
source§fn lossy_into(self) -> Dst
fn lossy_into(self) -> Dst
source§impl<T> OverflowingAs for T
impl<T> OverflowingAs for T
source§fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
source§impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
source§fn overflowing_cast_from(src: Src) -> (Dst, bool)
fn overflowing_cast_from(src: Src) -> (Dst, bool)
§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self
and passes that borrow into the pipe function. Read more§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self
and passes that borrow into the pipe function. Read more§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self
, then passes self.as_ref()
into the pipe function.§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self
, then passes self.as_mut()
into the pipe
function.§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self
, then passes self.deref()
into the pipe function.§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<T> SaturatingAs for T
impl<T> SaturatingAs for T
source§fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
source§impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
source§fn saturating_cast_from(src: Src) -> Dst
fn saturating_cast_from(src: Src) -> Dst
§impl<Context> SubContext<Context> for Context
impl<Context> SubContext<Context> for Context
fn sub_context(self) -> Context
§impl<T> Tap for T
impl<T> Tap for T
§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B>
of a value. Read more§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B>
of a value. Read more§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R>
view of a value. Read more§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R>
view of a value. Read more§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target
of a value. Read more§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target
of a value. Read more§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap()
only in debug builds, and is erased in release builds.§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut()
only in debug builds, and is erased in release
builds.§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow()
only in debug builds, and is erased in release
builds.§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut()
only in debug builds, and is erased in release
builds.§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref()
only in debug builds, and is erased in release
builds.§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut()
only in debug builds, and is erased in release
builds.§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref()
only in debug builds, and is erased in release
builds.§impl<T> TryConv for T
impl<T> TryConv for T
§impl<T> TryDefault for Twhere
T: Default,
impl<T> TryDefault for Twhere
T: Default,
§fn try_default() -> Result<T, String>
fn try_default() -> Result<T, String>
§fn unwrap_default() -> Self
fn unwrap_default() -> Self
try_default
and panics on an error case.