pub(crate) type RuleState<R> = AtomicRefCell<R>;
Aliased Type§
struct RuleState<R> { /* private fields */ }
Implementations
§impl<T> AtomicRefCell<T>
impl<T> AtomicRefCell<T>
pub const fn new(value: T) -> AtomicRefCell<T>
pub const fn new(value: T) -> AtomicRefCell<T>
Creates a new AtomicRefCell
containing value
.
pub fn into_inner(self) -> T
pub fn into_inner(self) -> T
Consumes the AtomicRefCell
, returning the wrapped value.
§impl<T> AtomicRefCell<T>where
T: ?Sized,
impl<T> AtomicRefCell<T>where
T: ?Sized,
pub fn borrow(&self) -> AtomicRef<'_, T>
pub fn borrow(&self) -> AtomicRef<'_, T>
Immutably borrows the wrapped value.
pub fn try_borrow(&self) -> Result<AtomicRef<'_, T>, BorrowError>
pub fn try_borrow(&self) -> Result<AtomicRef<'_, T>, BorrowError>
Attempts to immutably borrow the wrapped value, but instead of panicking
on a failed borrow, returns Err
.
pub fn borrow_mut(&self) -> AtomicRefMut<'_, T>
pub fn borrow_mut(&self) -> AtomicRefMut<'_, T>
Mutably borrows the wrapped value.
pub fn try_borrow_mut(&self) -> Result<AtomicRefMut<'_, T>, BorrowMutError>
pub fn try_borrow_mut(&self) -> Result<AtomicRefMut<'_, T>, BorrowMutError>
Attempts to mutably borrow the wrapped value, but instead of panicking
on a failed borrow, returns Err
.
Trait Implementations
§impl<T> Ord for AtomicRefCell<T>
impl<T> Ord for AtomicRefCell<T>
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more