pub struct Cell<T>where
T: ?Sized,{ /* private fields */ }
Expand description
A mutable memory location.
§Memory layout
Cell<T>
has the same memory layout and caveats as
UnsafeCell<T>
. In particular, this means that
Cell<T>
has the same in-memory representation as its inner type T
.
§Examples
In this example, you can see that Cell<T>
enables mutation inside an
immutable struct. In other words, it enables “interior mutability”.
use std::cell::Cell;
struct SomeStruct {
regular_field: u8,
special_field: Cell<u8>,
}
let my_struct = SomeStruct {
regular_field: 0,
special_field: Cell::new(1),
};
let new_value = 100;
// ERROR: `my_struct` is immutable
// my_struct.regular_field = new_value;
// WORKS: although `my_struct` is immutable, `special_field` is a `Cell`,
// which can always be mutated
my_struct.special_field.set(new_value);
assert_eq!(my_struct.special_field.get(), new_value);
See the module-level documentation for more.
Implementations§
source§impl<T> Cell<T>
impl<T> Cell<T>
1.17.0 · sourcepub fn swap(&self, other: &Cell<T>)
pub fn swap(&self, other: &Cell<T>)
Swaps the values of two Cell
s.
The difference with std::mem::swap
is that this function doesn’t
require a &mut
reference.
§Panics
This function will panic if self
and other
are different Cell
s that partially overlap.
(Using just standard library methods, it is impossible to create such partially overlapping Cell
s.
However, unsafe code is allowed to e.g. create two &Cell<[i32; 2]>
that partially overlap.)
§Examples
use std::cell::Cell;
let c1 = Cell::new(5i32);
let c2 = Cell::new(10i32);
c1.swap(&c2);
assert_eq!(10, c1.get());
assert_eq!(5, c2.get());
1.17.0 · sourcepub fn replace(&self, val: T) -> T
pub fn replace(&self, val: T) -> T
Replaces the contained value with val
, and returns the old contained value.
§Examples
use std::cell::Cell;
let cell = Cell::new(5);
assert_eq!(cell.get(), 5);
assert_eq!(cell.replace(10), 5);
assert_eq!(cell.get(), 10);
1.17.0 (const: unstable) · sourcepub fn into_inner(self) -> T
pub fn into_inner(self) -> T
Unwraps the value, consuming the cell.
§Examples
use std::cell::Cell;
let c = Cell::new(5);
let five = c.into_inner();
assert_eq!(five, 5);
source§impl<T> Cell<T>where
T: Copy,
impl<T> Cell<T>where
T: Copy,
1.0.0 · sourcepub fn get(&self) -> T
pub fn get(&self) -> T
Returns a copy of the contained value.
§Examples
use std::cell::Cell;
let c = Cell::new(5);
let five = c.get();
sourcepub fn update<F>(&self, f: F) -> Twhere
F: FnOnce(T) -> T,
🔬This is a nightly-only experimental API. (cell_update
)
pub fn update<F>(&self, f: F) -> Twhere
F: FnOnce(T) -> T,
cell_update
)Updates the contained value using a function and returns the new value.
§Examples
#![feature(cell_update)]
use std::cell::Cell;
let c = Cell::new(5);
let new = c.update(|x| x + 1);
assert_eq!(new, 6);
assert_eq!(c.get(), 6);
source§impl<T> Cell<T>where
T: ?Sized,
impl<T> Cell<T>where
T: ?Sized,
1.12.0 (const: 1.32.0) · sourcepub const fn as_ptr(&self) -> *mut T
pub const fn as_ptr(&self) -> *mut T
Returns a raw pointer to the underlying data in this cell.
§Examples
use std::cell::Cell;
let c = Cell::new(5);
let ptr = c.as_ptr();
1.11.0 · sourcepub fn get_mut(&mut self) -> &mut T
pub fn get_mut(&mut self) -> &mut T
Returns a mutable reference to the underlying data.
This call borrows Cell
mutably (at compile-time) which guarantees
that we possess the only reference.
However be cautious: this method expects self
to be mutable, which is
generally not the case when using a Cell
. If you require interior
mutability by reference, consider using RefCell
which provides
run-time checked mutable borrows through its borrow_mut
method.
§Examples
use std::cell::Cell;
let mut c = Cell::new(5);
*c.get_mut() += 1;
assert_eq!(c.get(), 6);
1.37.0 · sourcepub fn from_mut(t: &mut T) -> &Cell<T>
pub fn from_mut(t: &mut T) -> &Cell<T>
Returns a &Cell<T>
from a &mut T
§Examples
use std::cell::Cell;
let slice: &mut [i32] = &mut [1, 2, 3];
let cell_slice: &Cell<[i32]> = Cell::from_mut(slice);
let slice_cell: &[Cell<i32>] = cell_slice.as_slice_of_cells();
assert_eq!(slice_cell.len(), 3);
source§impl<T> Cell<[T]>
impl<T> Cell<[T]>
1.37.0 · sourcepub fn as_slice_of_cells(&self) -> &[Cell<T>]
pub fn as_slice_of_cells(&self) -> &[Cell<T>]
Returns a &[Cell<T>]
from a &Cell<[T]>
§Examples
use std::cell::Cell;
let slice: &mut [i32] = &mut [1, 2, 3];
let cell_slice: &Cell<[i32]> = Cell::from_mut(slice);
let slice_cell: &[Cell<i32>] = cell_slice.as_slice_of_cells();
assert_eq!(slice_cell.len(), 3);
source§impl<T, const N: usize> Cell<[T; N]>
impl<T, const N: usize> Cell<[T; N]>
sourcepub fn as_array_of_cells(&self) -> &[Cell<T>; N]
🔬This is a nightly-only experimental API. (as_array_of_cells
)
pub fn as_array_of_cells(&self) -> &[Cell<T>; N]
as_array_of_cells
)Returns a &[Cell<T>; N]
from a &Cell<[T; N]>
§Examples
#![feature(as_array_of_cells)]
use std::cell::Cell;
let mut array: [i32; 3] = [1, 2, 3];
let cell_array: &Cell<[i32; 3]> = Cell::from_mut(&mut array);
let array_cell: &[Cell<i32>; 3] = cell_array.as_array_of_cells();
Trait Implementations§
source§impl BitStore for Cell<u16>
impl BitStore for Cell<u16>
§type Mem = u16
type Mem = u16
BitSlice
. It
is always one of the unsigned integer fundamentals.§type Access = Cell<u16>
type Access = Cell<u16>
Self::Mem
value between the processor and the memory system. Read more§type Alias = Cell<u16>
type Alias = Cell<u16>
BitStore
implementor that is known to be alias-safe. It is
used when a BitSlice
introduces multiple handles that view the same
memory location, and at least one of them has write capabilities to it.
It must have the same underlying memory type, and can only change access
patterns or public-facing usage.§type Unalias = Cell<u16>
type Unalias = Cell<u16>
::Alias
. It is used when a BitSlice
removes the
conditions that required a T -> T::Alias
transition.source§fn new(value: <Cell<u16> as BitStore>::Mem) -> Cell<u16>
fn new(value: <Cell<u16> as BitStore>::Mem) -> Cell<u16>
BitStore
type.source§fn load_value(&self) -> <Cell<u16> as BitStore>::Mem
fn load_value(&self) -> <Cell<u16> as BitStore>::Mem
::Access
rules. This may be called when the value is aliased by a write-capable
reference.source§fn store_value(&mut self, value: <Cell<u16> as BitStore>::Mem)
fn store_value(&mut self, value: <Cell<u16> as BitStore>::Mem)
::Access
constraints.source§const ALIGNED_TO_SIZE: [(); 1] = _
const ALIGNED_TO_SIZE: [(); 1] = _
source§impl BitStore for Cell<u32>
impl BitStore for Cell<u32>
§type Mem = u32
type Mem = u32
BitSlice
. It
is always one of the unsigned integer fundamentals.§type Access = Cell<u32>
type Access = Cell<u32>
Self::Mem
value between the processor and the memory system. Read more§type Alias = Cell<u32>
type Alias = Cell<u32>
BitStore
implementor that is known to be alias-safe. It is
used when a BitSlice
introduces multiple handles that view the same
memory location, and at least one of them has write capabilities to it.
It must have the same underlying memory type, and can only change access
patterns or public-facing usage.§type Unalias = Cell<u32>
type Unalias = Cell<u32>
::Alias
. It is used when a BitSlice
removes the
conditions that required a T -> T::Alias
transition.source§fn new(value: <Cell<u32> as BitStore>::Mem) -> Cell<u32>
fn new(value: <Cell<u32> as BitStore>::Mem) -> Cell<u32>
BitStore
type.source§fn load_value(&self) -> <Cell<u32> as BitStore>::Mem
fn load_value(&self) -> <Cell<u32> as BitStore>::Mem
::Access
rules. This may be called when the value is aliased by a write-capable
reference.source§fn store_value(&mut self, value: <Cell<u32> as BitStore>::Mem)
fn store_value(&mut self, value: <Cell<u32> as BitStore>::Mem)
::Access
constraints.source§const ALIGNED_TO_SIZE: [(); 1] = _
const ALIGNED_TO_SIZE: [(); 1] = _
source§impl BitStore for Cell<u64>
impl BitStore for Cell<u64>
§type Mem = u64
type Mem = u64
BitSlice
. It
is always one of the unsigned integer fundamentals.§type Access = Cell<u64>
type Access = Cell<u64>
Self::Mem
value between the processor and the memory system. Read more§type Alias = Cell<u64>
type Alias = Cell<u64>
BitStore
implementor that is known to be alias-safe. It is
used when a BitSlice
introduces multiple handles that view the same
memory location, and at least one of them has write capabilities to it.
It must have the same underlying memory type, and can only change access
patterns or public-facing usage.§type Unalias = Cell<u64>
type Unalias = Cell<u64>
::Alias
. It is used when a BitSlice
removes the
conditions that required a T -> T::Alias
transition.source§fn new(value: <Cell<u64> as BitStore>::Mem) -> Cell<u64>
fn new(value: <Cell<u64> as BitStore>::Mem) -> Cell<u64>
BitStore
type.source§fn load_value(&self) -> <Cell<u64> as BitStore>::Mem
fn load_value(&self) -> <Cell<u64> as BitStore>::Mem
::Access
rules. This may be called when the value is aliased by a write-capable
reference.source§fn store_value(&mut self, value: <Cell<u64> as BitStore>::Mem)
fn store_value(&mut self, value: <Cell<u64> as BitStore>::Mem)
::Access
constraints.source§const ALIGNED_TO_SIZE: [(); 1] = _
const ALIGNED_TO_SIZE: [(); 1] = _
source§impl BitStore for Cell<u8>
impl BitStore for Cell<u8>
§type Mem = u8
type Mem = u8
BitSlice
. It
is always one of the unsigned integer fundamentals.§type Access = Cell<u8>
type Access = Cell<u8>
Self::Mem
value between the processor and the memory system. Read more§type Alias = Cell<u8>
type Alias = Cell<u8>
BitStore
implementor that is known to be alias-safe. It is
used when a BitSlice
introduces multiple handles that view the same
memory location, and at least one of them has write capabilities to it.
It must have the same underlying memory type, and can only change access
patterns or public-facing usage.§type Unalias = Cell<u8>
type Unalias = Cell<u8>
::Alias
. It is used when a BitSlice
removes the
conditions that required a T -> T::Alias
transition.source§fn new(value: <Cell<u8> as BitStore>::Mem) -> Cell<u8>
fn new(value: <Cell<u8> as BitStore>::Mem) -> Cell<u8>
BitStore
type.source§fn load_value(&self) -> <Cell<u8> as BitStore>::Mem
fn load_value(&self) -> <Cell<u8> as BitStore>::Mem
::Access
rules. This may be called when the value is aliased by a write-capable
reference.source§fn store_value(&mut self, value: <Cell<u8> as BitStore>::Mem)
fn store_value(&mut self, value: <Cell<u8> as BitStore>::Mem)
::Access
constraints.source§const ALIGNED_TO_SIZE: [(); 1] = _
const ALIGNED_TO_SIZE: [(); 1] = _
source§impl BitStore for Cell<usize>
impl BitStore for Cell<usize>
§type Mem = usize
type Mem = usize
BitSlice
. It
is always one of the unsigned integer fundamentals.§type Access = Cell<usize>
type Access = Cell<usize>
Self::Mem
value between the processor and the memory system. Read more§type Alias = Cell<usize>
type Alias = Cell<usize>
BitStore
implementor that is known to be alias-safe. It is
used when a BitSlice
introduces multiple handles that view the same
memory location, and at least one of them has write capabilities to it.
It must have the same underlying memory type, and can only change access
patterns or public-facing usage.§type Unalias = Cell<usize>
type Unalias = Cell<usize>
::Alias
. It is used when a BitSlice
removes the
conditions that required a T -> T::Alias
transition.source§fn new(value: <Cell<usize> as BitStore>::Mem) -> Cell<usize>
fn new(value: <Cell<usize> as BitStore>::Mem) -> Cell<usize>
BitStore
type.source§fn load_value(&self) -> <Cell<usize> as BitStore>::Mem
fn load_value(&self) -> <Cell<usize> as BitStore>::Mem
::Access
rules. This may be called when the value is aliased by a write-capable
reference.source§fn store_value(&mut self, value: <Cell<usize> as BitStore>::Mem)
fn store_value(&mut self, value: <Cell<usize> as BitStore>::Mem)
::Access
constraints.source§const ALIGNED_TO_SIZE: [(); 1] = _
const ALIGNED_TO_SIZE: [(); 1] = _
source§impl<'de, T> BorrowDecode<'de> for Cell<T>where
T: BorrowDecode<'de>,
impl<'de, T> BorrowDecode<'de> for Cell<T>where
T: BorrowDecode<'de>,
source§fn borrow_decode<D>(decoder: &mut D) -> Result<Cell<T>, DecodeError>where
D: BorrowDecoder<'de>,
fn borrow_decode<D>(decoder: &mut D) -> Result<Cell<T>, DecodeError>where
D: BorrowDecoder<'de>,
source§impl<'de, T> Deserialize<'de> for Cell<T>where
T: Deserialize<'de> + Copy,
impl<'de, T> Deserialize<'de> for Cell<T>where
T: Deserialize<'de> + Copy,
source§fn deserialize<D>(
deserializer: D,
) -> Result<Cell<T>, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<Cell<T>, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
1.10.0 · source§impl<T> Ord for Cell<T>
impl<T> Ord for Cell<T>
1.10.0 · source§impl<T> PartialOrd for Cell<T>where
T: PartialOrd + Copy,
impl<T> PartialOrd for Cell<T>where
T: PartialOrd + Copy,
source§impl<T> Radium for Cell<*mut T>
impl<T> Radium for Cell<*mut T>
type Item = *mut T
source§fn get_mut(&mut self) -> &mut *mut T
fn get_mut(&mut self) -> &mut *mut T
source§fn into_inner(self) -> *mut T
fn into_inner(self) -> *mut T
source§fn swap(&self, value: *mut T, _: Ordering) -> *mut T
fn swap(&self, value: *mut T, _: Ordering) -> *mut T
source§fn compare_and_swap(&self, current: *mut T, new: *mut T, _: Ordering) -> *mut T
fn compare_and_swap(&self, current: *mut T, new: *mut T, _: Ordering) -> *mut T
compare_exchange
or compare_exchange_weak
insteadcurrent
value. Read moresource§fn compare_exchange(
&self,
current: *mut T,
new: *mut T,
_: Ordering,
_: Ordering,
) -> Result<*mut T, *mut T>
fn compare_exchange( &self, current: *mut T, new: *mut T, _: Ordering, _: Ordering, ) -> Result<*mut T, *mut T>
current
value. Read moresource§impl Radium for Cell<bool>
impl Radium for Cell<bool>
type Item = bool
source§fn get_mut(&mut self) -> &mut bool
fn get_mut(&mut self) -> &mut bool
source§fn into_inner(self) -> bool
fn into_inner(self) -> bool
source§fn swap(&self, value: bool, _: Ordering) -> bool
fn swap(&self, value: bool, _: Ordering) -> bool
source§fn compare_and_swap(&self, current: bool, new: bool, _: Ordering) -> bool
fn compare_and_swap(&self, current: bool, new: bool, _: Ordering) -> bool
compare_exchange
or compare_exchange_weak
insteadcurrent
value. Read moresource§fn compare_exchange(
&self,
current: bool,
new: bool,
_: Ordering,
_: Ordering,
) -> Result<bool, bool>
fn compare_exchange( &self, current: bool, new: bool, _: Ordering, _: Ordering, ) -> Result<bool, bool>
current
value. Read moresource§fn compare_exchange_weak(
&self,
current: bool,
new: bool,
success: Ordering,
failure: Ordering,
) -> Result<bool, bool>
fn compare_exchange_weak( &self, current: bool, new: bool, success: Ordering, failure: Ordering, ) -> Result<bool, bool>
current
value. Read moresource§fn fetch_update<F>(&self, _: Ordering, _: Ordering, f: F) -> Result<bool, bool>
fn fetch_update<F>(&self, _: Ordering, _: Ordering, f: F) -> Result<bool, bool>
source§fn fetch_and(&self, value: bool, _: Ordering) -> bool
fn fetch_and(&self, value: bool, _: Ordering) -> bool
value
, and stores the result in self
. Read moresource§fn fetch_nand(&self, value: bool, _: Ordering) -> bool
fn fetch_nand(&self, value: bool, _: Ordering) -> bool
value
, and stores the result in self
. Read moresource§impl Radium for Cell<i16>
impl Radium for Cell<i16>
type Item = i16
source§fn get_mut(&mut self) -> &mut i16
fn get_mut(&mut self) -> &mut i16
source§fn into_inner(self) -> i16
fn into_inner(self) -> i16
source§fn swap(&self, value: i16, _: Ordering) -> i16
fn swap(&self, value: i16, _: Ordering) -> i16
source§fn compare_and_swap(&self, current: i16, new: i16, _: Ordering) -> i16
fn compare_and_swap(&self, current: i16, new: i16, _: Ordering) -> i16
compare_exchange
or compare_exchange_weak
insteadcurrent
value. Read moresource§fn compare_exchange(
&self,
current: i16,
new: i16,
_: Ordering,
_: Ordering,
) -> Result<i16, i16>
fn compare_exchange( &self, current: i16, new: i16, _: Ordering, _: Ordering, ) -> Result<i16, i16>
current
value. Read moresource§fn compare_exchange_weak(
&self,
current: i16,
new: i16,
success: Ordering,
failure: Ordering,
) -> Result<i16, i16>
fn compare_exchange_weak( &self, current: i16, new: i16, success: Ordering, failure: Ordering, ) -> Result<i16, i16>
current
value. Read moresource§fn fetch_update<F>(&self, _: Ordering, _: Ordering, f: F) -> Result<i16, i16>
fn fetch_update<F>(&self, _: Ordering, _: Ordering, f: F) -> Result<i16, i16>
source§fn fetch_and(&self, value: i16, _: Ordering) -> i16
fn fetch_and(&self, value: i16, _: Ordering) -> i16
value
, and stores the result in self
. Read moresource§fn fetch_nand(&self, value: i16, _: Ordering) -> i16
fn fetch_nand(&self, value: i16, _: Ordering) -> i16
value
, and stores the result in self
. Read moresource§fn fetch_or(&self, value: i16, _: Ordering) -> i16
fn fetch_or(&self, value: i16, _: Ordering) -> i16
value
, and stores the result in self
. Read moresource§fn fetch_xor(&self, value: i16, _: Ordering) -> i16
fn fetch_xor(&self, value: i16, _: Ordering) -> i16
value
, and stores the result in self
. Read moresource§impl Radium for Cell<i32>
impl Radium for Cell<i32>
type Item = i32
source§fn get_mut(&mut self) -> &mut i32
fn get_mut(&mut self) -> &mut i32
source§fn into_inner(self) -> i32
fn into_inner(self) -> i32
source§fn swap(&self, value: i32, _: Ordering) -> i32
fn swap(&self, value: i32, _: Ordering) -> i32
source§fn compare_and_swap(&self, current: i32, new: i32, _: Ordering) -> i32
fn compare_and_swap(&self, current: i32, new: i32, _: Ordering) -> i32
compare_exchange
or compare_exchange_weak
insteadcurrent
value. Read moresource§fn compare_exchange(
&self,
current: i32,
new: i32,
_: Ordering,
_: Ordering,
) -> Result<i32, i32>
fn compare_exchange( &self, current: i32, new: i32, _: Ordering, _: Ordering, ) -> Result<i32, i32>
current
value. Read moresource§fn compare_exchange_weak(
&self,
current: i32,
new: i32,
success: Ordering,
failure: Ordering,
) -> Result<i32, i32>
fn compare_exchange_weak( &self, current: i32, new: i32, success: Ordering, failure: Ordering, ) -> Result<i32, i32>
current
value. Read moresource§fn fetch_update<F>(&self, _: Ordering, _: Ordering, f: F) -> Result<i32, i32>
fn fetch_update<F>(&self, _: Ordering, _: Ordering, f: F) -> Result<i32, i32>
source§fn fetch_and(&self, value: i32, _: Ordering) -> i32
fn fetch_and(&self, value: i32, _: Ordering) -> i32
value
, and stores the result in self
. Read moresource§fn fetch_nand(&self, value: i32, _: Ordering) -> i32
fn fetch_nand(&self, value: i32, _: Ordering) -> i32
value
, and stores the result in self
. Read moresource§fn fetch_or(&self, value: i32, _: Ordering) -> i32
fn fetch_or(&self, value: i32, _: Ordering) -> i32
value
, and stores the result in self
. Read moresource§fn fetch_xor(&self, value: i32, _: Ordering) -> i32
fn fetch_xor(&self, value: i32, _: Ordering) -> i32
value
, and stores the result in self
. Read moresource§impl Radium for Cell<i64>
impl Radium for Cell<i64>
type Item = i64
source§fn get_mut(&mut self) -> &mut i64
fn get_mut(&mut self) -> &mut i64
source§fn into_inner(self) -> i64
fn into_inner(self) -> i64
source§fn swap(&self, value: i64, _: Ordering) -> i64
fn swap(&self, value: i64, _: Ordering) -> i64
source§fn compare_and_swap(&self, current: i64, new: i64, _: Ordering) -> i64
fn compare_and_swap(&self, current: i64, new: i64, _: Ordering) -> i64
compare_exchange
or compare_exchange_weak
insteadcurrent
value. Read moresource§fn compare_exchange(
&self,
current: i64,
new: i64,
_: Ordering,
_: Ordering,
) -> Result<i64, i64>
fn compare_exchange( &self, current: i64, new: i64, _: Ordering, _: Ordering, ) -> Result<i64, i64>
current
value. Read moresource§fn compare_exchange_weak(
&self,
current: i64,
new: i64,
success: Ordering,
failure: Ordering,
) -> Result<i64, i64>
fn compare_exchange_weak( &self, current: i64, new: i64, success: Ordering, failure: Ordering, ) -> Result<i64, i64>
current
value. Read moresource§fn fetch_update<F>(&self, _: Ordering, _: Ordering, f: F) -> Result<i64, i64>
fn fetch_update<F>(&self, _: Ordering, _: Ordering, f: F) -> Result<i64, i64>
source§fn fetch_and(&self, value: i64, _: Ordering) -> i64
fn fetch_and(&self, value: i64, _: Ordering) -> i64
value
, and stores the result in self
. Read moresource§fn fetch_nand(&self, value: i64, _: Ordering) -> i64
fn fetch_nand(&self, value: i64, _: Ordering) -> i64
value
, and stores the result in self
. Read moresource§fn fetch_or(&self, value: i64, _: Ordering) -> i64
fn fetch_or(&self, value: i64, _: Ordering) -> i64
value
, and stores the result in self
. Read moresource§fn fetch_xor(&self, value: i64, _: Ordering) -> i64
fn fetch_xor(&self, value: i64, _: Ordering) -> i64
value
, and stores the result in self
. Read moresource§impl Radium for Cell<i8>
impl Radium for Cell<i8>
type Item = i8
source§fn get_mut(&mut self) -> &mut i8
fn get_mut(&mut self) -> &mut i8
source§fn into_inner(self) -> i8
fn into_inner(self) -> i8
source§fn swap(&self, value: i8, _: Ordering) -> i8
fn swap(&self, value: i8, _: Ordering) -> i8
source§fn compare_and_swap(&self, current: i8, new: i8, _: Ordering) -> i8
fn compare_and_swap(&self, current: i8, new: i8, _: Ordering) -> i8
compare_exchange
or compare_exchange_weak
insteadcurrent
value. Read moresource§fn compare_exchange(
&self,
current: i8,
new: i8,
_: Ordering,
_: Ordering,
) -> Result<i8, i8>
fn compare_exchange( &self, current: i8, new: i8, _: Ordering, _: Ordering, ) -> Result<i8, i8>
current
value. Read moresource§fn compare_exchange_weak(
&self,
current: i8,
new: i8,
success: Ordering,
failure: Ordering,
) -> Result<i8, i8>
fn compare_exchange_weak( &self, current: i8, new: i8, success: Ordering, failure: Ordering, ) -> Result<i8, i8>
current
value. Read moresource§fn fetch_update<F>(&self, _: Ordering, _: Ordering, f: F) -> Result<i8, i8>
fn fetch_update<F>(&self, _: Ordering, _: Ordering, f: F) -> Result<i8, i8>
source§fn fetch_and(&self, value: i8, _: Ordering) -> i8
fn fetch_and(&self, value: i8, _: Ordering) -> i8
value
, and stores the result in self
. Read moresource§fn fetch_nand(&self, value: i8, _: Ordering) -> i8
fn fetch_nand(&self, value: i8, _: Ordering) -> i8
value
, and stores the result in self
. Read moresource§fn fetch_or(&self, value: i8, _: Ordering) -> i8
fn fetch_or(&self, value: i8, _: Ordering) -> i8
value
, and stores the result in self
. Read moresource§fn fetch_xor(&self, value: i8, _: Ordering) -> i8
fn fetch_xor(&self, value: i8, _: Ordering) -> i8
value
, and stores the result in self
. Read moresource§impl Radium for Cell<isize>
impl Radium for Cell<isize>
type Item = isize
source§fn get_mut(&mut self) -> &mut isize
fn get_mut(&mut self) -> &mut isize
source§fn into_inner(self) -> isize
fn into_inner(self) -> isize
source§fn swap(&self, value: isize, _: Ordering) -> isize
fn swap(&self, value: isize, _: Ordering) -> isize
source§fn compare_and_swap(&self, current: isize, new: isize, _: Ordering) -> isize
fn compare_and_swap(&self, current: isize, new: isize, _: Ordering) -> isize
compare_exchange
or compare_exchange_weak
insteadcurrent
value. Read moresource§fn compare_exchange(
&self,
current: isize,
new: isize,
_: Ordering,
_: Ordering,
) -> Result<isize, isize>
fn compare_exchange( &self, current: isize, new: isize, _: Ordering, _: Ordering, ) -> Result<isize, isize>
current
value. Read moresource§fn compare_exchange_weak(
&self,
current: isize,
new: isize,
success: Ordering,
failure: Ordering,
) -> Result<isize, isize>
fn compare_exchange_weak( &self, current: isize, new: isize, success: Ordering, failure: Ordering, ) -> Result<isize, isize>
current
value. Read moresource§fn fetch_update<F>(
&self,
_: Ordering,
_: Ordering,
f: F,
) -> Result<isize, isize>
fn fetch_update<F>( &self, _: Ordering, _: Ordering, f: F, ) -> Result<isize, isize>
source§fn fetch_and(&self, value: isize, _: Ordering) -> isize
fn fetch_and(&self, value: isize, _: Ordering) -> isize
value
, and stores the result in self
. Read moresource§fn fetch_nand(&self, value: isize, _: Ordering) -> isize
fn fetch_nand(&self, value: isize, _: Ordering) -> isize
value
, and stores the result in self
. Read moresource§fn fetch_or(&self, value: isize, _: Ordering) -> isize
fn fetch_or(&self, value: isize, _: Ordering) -> isize
value
, and stores the result in self
. Read moresource§fn fetch_xor(&self, value: isize, _: Ordering) -> isize
fn fetch_xor(&self, value: isize, _: Ordering) -> isize
value
, and stores the result in self
. Read moresource§impl Radium for Cell<u16>
impl Radium for Cell<u16>
type Item = u16
source§fn get_mut(&mut self) -> &mut u16
fn get_mut(&mut self) -> &mut u16
source§fn into_inner(self) -> u16
fn into_inner(self) -> u16
source§fn swap(&self, value: u16, _: Ordering) -> u16
fn swap(&self, value: u16, _: Ordering) -> u16
source§fn compare_and_swap(&self, current: u16, new: u16, _: Ordering) -> u16
fn compare_and_swap(&self, current: u16, new: u16, _: Ordering) -> u16
compare_exchange
or compare_exchange_weak
insteadcurrent
value. Read moresource§fn compare_exchange(
&self,
current: u16,
new: u16,
_: Ordering,
_: Ordering,
) -> Result<u16, u16>
fn compare_exchange( &self, current: u16, new: u16, _: Ordering, _: Ordering, ) -> Result<u16, u16>
current
value. Read moresource§fn compare_exchange_weak(
&self,
current: u16,
new: u16,
success: Ordering,
failure: Ordering,
) -> Result<u16, u16>
fn compare_exchange_weak( &self, current: u16, new: u16, success: Ordering, failure: Ordering, ) -> Result<u16, u16>
current
value. Read moresource§fn fetch_update<F>(&self, _: Ordering, _: Ordering, f: F) -> Result<u16, u16>
fn fetch_update<F>(&self, _: Ordering, _: Ordering, f: F) -> Result<u16, u16>
source§fn fetch_and(&self, value: u16, _: Ordering) -> u16
fn fetch_and(&self, value: u16, _: Ordering) -> u16
value
, and stores the result in self
. Read moresource§fn fetch_nand(&self, value: u16, _: Ordering) -> u16
fn fetch_nand(&self, value: u16, _: Ordering) -> u16
value
, and stores the result in self
. Read moresource§fn fetch_or(&self, value: u16, _: Ordering) -> u16
fn fetch_or(&self, value: u16, _: Ordering) -> u16
value
, and stores the result in self
. Read moresource§fn fetch_xor(&self, value: u16, _: Ordering) -> u16
fn fetch_xor(&self, value: u16, _: Ordering) -> u16
value
, and stores the result in self
. Read moresource§impl Radium for Cell<u32>
impl Radium for Cell<u32>
type Item = u32
source§fn get_mut(&mut self) -> &mut u32
fn get_mut(&mut self) -> &mut u32
source§fn into_inner(self) -> u32
fn into_inner(self) -> u32
source§fn swap(&self, value: u32, _: Ordering) -> u32
fn swap(&self, value: u32, _: Ordering) -> u32
source§fn compare_and_swap(&self, current: u32, new: u32, _: Ordering) -> u32
fn compare_and_swap(&self, current: u32, new: u32, _: Ordering) -> u32
compare_exchange
or compare_exchange_weak
insteadcurrent
value. Read moresource§fn compare_exchange(
&self,
current: u32,
new: u32,
_: Ordering,
_: Ordering,
) -> Result<u32, u32>
fn compare_exchange( &self, current: u32, new: u32, _: Ordering, _: Ordering, ) -> Result<u32, u32>
current
value. Read moresource§fn compare_exchange_weak(
&self,
current: u32,
new: u32,
success: Ordering,
failure: Ordering,
) -> Result<u32, u32>
fn compare_exchange_weak( &self, current: u32, new: u32, success: Ordering, failure: Ordering, ) -> Result<u32, u32>
current
value. Read moresource§fn fetch_update<F>(&self, _: Ordering, _: Ordering, f: F) -> Result<u32, u32>
fn fetch_update<F>(&self, _: Ordering, _: Ordering, f: F) -> Result<u32, u32>
source§fn fetch_and(&self, value: u32, _: Ordering) -> u32
fn fetch_and(&self, value: u32, _: Ordering) -> u32
value
, and stores the result in self
. Read moresource§fn fetch_nand(&self, value: u32, _: Ordering) -> u32
fn fetch_nand(&self, value: u32, _: Ordering) -> u32
value
, and stores the result in self
. Read moresource§fn fetch_or(&self, value: u32, _: Ordering) -> u32
fn fetch_or(&self, value: u32, _: Ordering) -> u32
value
, and stores the result in self
. Read moresource§fn fetch_xor(&self, value: u32, _: Ordering) -> u32
fn fetch_xor(&self, value: u32, _: Ordering) -> u32
value
, and stores the result in self
. Read moresource§impl Radium for Cell<u64>
impl Radium for Cell<u64>
type Item = u64
source§fn get_mut(&mut self) -> &mut u64
fn get_mut(&mut self) -> &mut u64
source§fn into_inner(self) -> u64
fn into_inner(self) -> u64
source§fn swap(&self, value: u64, _: Ordering) -> u64
fn swap(&self, value: u64, _: Ordering) -> u64
source§fn compare_and_swap(&self, current: u64, new: u64, _: Ordering) -> u64
fn compare_and_swap(&self, current: u64, new: u64, _: Ordering) -> u64
compare_exchange
or compare_exchange_weak
insteadcurrent
value. Read moresource§fn compare_exchange(
&self,
current: u64,
new: u64,
_: Ordering,
_: Ordering,
) -> Result<u64, u64>
fn compare_exchange( &self, current: u64, new: u64, _: Ordering, _: Ordering, ) -> Result<u64, u64>
current
value. Read moresource§fn compare_exchange_weak(
&self,
current: u64,
new: u64,
success: Ordering,
failure: Ordering,
) -> Result<u64, u64>
fn compare_exchange_weak( &self, current: u64, new: u64, success: Ordering, failure: Ordering, ) -> Result<u64, u64>
current
value. Read moresource§fn fetch_update<F>(&self, _: Ordering, _: Ordering, f: F) -> Result<u64, u64>
fn fetch_update<F>(&self, _: Ordering, _: Ordering, f: F) -> Result<u64, u64>
source§fn fetch_and(&self, value: u64, _: Ordering) -> u64
fn fetch_and(&self, value: u64, _: Ordering) -> u64
value
, and stores the result in self
. Read moresource§fn fetch_nand(&self, value: u64, _: Ordering) -> u64
fn fetch_nand(&self, value: u64, _: Ordering) -> u64
value
, and stores the result in self
. Read moresource§fn fetch_or(&self, value: u64, _: Ordering) -> u64
fn fetch_or(&self, value: u64, _: Ordering) -> u64
value
, and stores the result in self
. Read moresource§fn fetch_xor(&self, value: u64, _: Ordering) -> u64
fn fetch_xor(&self, value: u64, _: Ordering) -> u64
value
, and stores the result in self
. Read moresource§impl Radium for Cell<u8>
impl Radium for Cell<u8>
type Item = u8
source§fn get_mut(&mut self) -> &mut u8
fn get_mut(&mut self) -> &mut u8
source§fn into_inner(self) -> u8
fn into_inner(self) -> u8
source§fn swap(&self, value: u8, _: Ordering) -> u8
fn swap(&self, value: u8, _: Ordering) -> u8
source§fn compare_and_swap(&self, current: u8, new: u8, _: Ordering) -> u8
fn compare_and_swap(&self, current: u8, new: u8, _: Ordering) -> u8
compare_exchange
or compare_exchange_weak
insteadcurrent
value. Read moresource§fn compare_exchange(
&self,
current: u8,
new: u8,
_: Ordering,
_: Ordering,
) -> Result<u8, u8>
fn compare_exchange( &self, current: u8, new: u8, _: Ordering, _: Ordering, ) -> Result<u8, u8>
current
value. Read moresource§fn compare_exchange_weak(
&self,
current: u8,
new: u8,
success: Ordering,
failure: Ordering,
) -> Result<u8, u8>
fn compare_exchange_weak( &self, current: u8, new: u8, success: Ordering, failure: Ordering, ) -> Result<u8, u8>
current
value. Read moresource§fn fetch_update<F>(&self, _: Ordering, _: Ordering, f: F) -> Result<u8, u8>
fn fetch_update<F>(&self, _: Ordering, _: Ordering, f: F) -> Result<u8, u8>
source§fn fetch_and(&self, value: u8, _: Ordering) -> u8
fn fetch_and(&self, value: u8, _: Ordering) -> u8
value
, and stores the result in self
. Read moresource§fn fetch_nand(&self, value: u8, _: Ordering) -> u8
fn fetch_nand(&self, value: u8, _: Ordering) -> u8
value
, and stores the result in self
. Read moresource§fn fetch_or(&self, value: u8, _: Ordering) -> u8
fn fetch_or(&self, value: u8, _: Ordering) -> u8
value
, and stores the result in self
. Read moresource§fn fetch_xor(&self, value: u8, _: Ordering) -> u8
fn fetch_xor(&self, value: u8, _: Ordering) -> u8
value
, and stores the result in self
. Read moresource§impl Radium for Cell<usize>
impl Radium for Cell<usize>
type Item = usize
source§fn get_mut(&mut self) -> &mut usize
fn get_mut(&mut self) -> &mut usize
source§fn into_inner(self) -> usize
fn into_inner(self) -> usize
source§fn swap(&self, value: usize, _: Ordering) -> usize
fn swap(&self, value: usize, _: Ordering) -> usize
source§fn compare_and_swap(&self, current: usize, new: usize, _: Ordering) -> usize
fn compare_and_swap(&self, current: usize, new: usize, _: Ordering) -> usize
compare_exchange
or compare_exchange_weak
insteadcurrent
value. Read moresource§fn compare_exchange(
&self,
current: usize,
new: usize,
_: Ordering,
_: Ordering,
) -> Result<usize, usize>
fn compare_exchange( &self, current: usize, new: usize, _: Ordering, _: Ordering, ) -> Result<usize, usize>
current
value. Read moresource§fn compare_exchange_weak(
&self,
current: usize,
new: usize,
success: Ordering,
failure: Ordering,
) -> Result<usize, usize>
fn compare_exchange_weak( &self, current: usize, new: usize, success: Ordering, failure: Ordering, ) -> Result<usize, usize>
current
value. Read moresource§fn fetch_update<F>(
&self,
_: Ordering,
_: Ordering,
f: F,
) -> Result<usize, usize>
fn fetch_update<F>( &self, _: Ordering, _: Ordering, f: F, ) -> Result<usize, usize>
source§fn fetch_and(&self, value: usize, _: Ordering) -> usize
fn fetch_and(&self, value: usize, _: Ordering) -> usize
value
, and stores the result in self
. Read moresource§fn fetch_nand(&self, value: usize, _: Ordering) -> usize
fn fetch_nand(&self, value: usize, _: Ordering) -> usize
value
, and stores the result in self
. Read moresource§fn fetch_or(&self, value: usize, _: Ordering) -> usize
fn fetch_or(&self, value: usize, _: Ordering) -> usize
value
, and stores the result in self
. Read moresource§fn fetch_xor(&self, value: usize, _: Ordering) -> usize
fn fetch_xor(&self, value: usize, _: Ordering) -> usize
value
, and stores the result in self
. Read moresource§impl<T> Serialize for Cell<T>
impl<T> Serialize for Cell<T>
source§fn 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,
impl<T, U> CoerceUnsized<Cell<U>> for Cell<T>where
T: CoerceUnsized<U>,
impl<T, U> DispatchFromDyn<Cell<U>> for Cell<T>where
T: DispatchFromDyn<U>,
impl<T> Eq for Cell<T>
impl<T> Send for Cell<T>
impl<T> !Sync for Cell<T>where
T: ?Sized,
Auto Trait Implementations§
impl<T> !Freeze for Cell<T>
impl<T> !RefUnwindSafe for Cell<T>
impl<T> Unpin for Cell<T>
impl<T> UnwindSafe for Cell<T>where
T: UnwindSafe + ?Sized,
Blanket Implementations§
source§impl<T> BitView for Twhere
T: BitStore,
impl<T> BitView for Twhere
T: BitStore,
source§fn view_bits<O>(&self) -> &BitSlice<T, O> ⓘwhere
O: BitOrder,
fn view_bits<O>(&self) -> &BitSlice<T, O> ⓘwhere
O: BitOrder,
source§fn try_view_bits<O>(&self) -> Result<&BitSlice<T, O>, BitSpanError<T>>where
O: BitOrder,
fn try_view_bits<O>(&self) -> Result<&BitSlice<T, O>, BitSpanError<T>>where
O: BitOrder,
source§fn view_bits_mut<O>(&mut self) -> &mut BitSlice<T, O> ⓘwhere
O: BitOrder,
fn view_bits_mut<O>(&mut self) -> &mut BitSlice<T, O> ⓘwhere
O: BitOrder,
source§fn try_view_bits_mut<O>(
&mut self,
) -> Result<&mut BitSlice<T, O>, BitSpanError<T>>where
O: BitOrder,
fn try_view_bits_mut<O>(
&mut self,
) -> Result<&mut BitSlice<T, O>, BitSpanError<T>>where
O: BitOrder,
source§impl<T> BitViewSized for Twhere
T: BitStore,
impl<T> BitViewSized for Twhere
T: BitStore,
source§fn as_raw_slice(&self) -> &[<T as BitView>::Store]
fn as_raw_slice(&self) -> &[<T as BitView>::Store]
source§fn as_raw_mut_slice(&mut self) -> &mut [<T as BitView>::Store]
fn as_raw_mut_slice(&mut self) -> &mut [<T as BitView>::Store]
source§fn into_bitarray<O>(self) -> BitArray<Self, O>where
O: BitOrder,
fn into_bitarray<O>(self) -> BitArray<Self, O>where
O: BitOrder,
self
in a BitArray
.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> 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
)source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<T> FmtForward for T
impl<T> FmtForward for T
source§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.source§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.source§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.source§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.source§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.source§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.source§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.source§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.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<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
source§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 moresource§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 moresource§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
source§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
source§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.source§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.source§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.source§impl<T> Tap for T
impl<T> Tap for T
source§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 moresource§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 moresource§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 moresource§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 moresource§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 moresource§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 moresource§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.source§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.source§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.source§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.source§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.source§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.source§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.