std::cell::BorrowError
#[non_exhaustive]pub struct BorrowError
- Kind
- struct
- Module
std::cell- Since
- 1.13.0
Source: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
The entries of std::cell in the Rust reference. This page has 81 cards.
#[non_exhaustive]pub struct BorrowError
std::cellSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
#[non_exhaustive]pub struct BorrowMutError
std::cellSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub struct Cell<T>
std::cellSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub const fn as_array_of_cells(&self) -> &[Cell<T>; N]
std::cellSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub const fn as_ptr(&self) -> *mut T
std::cellSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub const fn as_slice_of_cells(&self) -> &[Cell<T>]
std::cellSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub const fn from_mut(t: &mut T) -> &Cell<T>
std::cellSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub const fn get(&self) -> T
std::cellSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub fn get_cloned(&self) -> Cell<T>
std::cellSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub const fn get_mut(&mut self) -> &mut T
std::cellSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub const fn into_inner(self) -> T
std::cellSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub const fn new(value: T) -> Cell<T>
std::cellSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub const fn replace(&self, val: T) -> T
std::cellSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub fn set(&self, val: T)
std::cellSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub fn swap(&self, other: &Cell<T>)
std::cellSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub fn take(&self) -> T where T: Default
std::cellSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub fn update(&self, f: impl FnOnce(T) -> T)
std::cellSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub unsafe trait CloneFromCell: Clone
std::cellSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub struct LazyCell<T, F = fn() -> T>
std::cellSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub fn force(this: &LazyCell<T, F>) -> &T
std::cellSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub fn force_mut(this: &mut LazyCell<T, F>) -> &mut T
std::cellSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub fn get(this: &LazyCell<T, F>) -> Option<&T>
std::cellSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub fn get_mut(this: &mut LazyCell<T, F>) -> Option<&mut T>
std::cellSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub const fn into_inner(this: LazyCell<T, F>) -> Result<T, F>
std::cellSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub const fn new(f: F) -> LazyCell<T, F>
std::cellSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub struct OnceCell<T>
std::cellSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub fn get(&self) -> Option<&T>
std::cellSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub fn get_mut(&mut self) -> Option<&mut T>
std::cellSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub fn get_mut_or_init<F>(&mut self, f: F) -> &mut T where F: FnOnce() -> T
std::cellSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub fn get_mut_or_try_init<F, E>(&mut self, f: F) -> Result<&mut T, E> where F: FnOnce() -> Result<T, E>
std::cellSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub fn get_or_init<F>(&self, f: F) -> &T where F: FnOnce() -> T
std::cellSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub fn get_or_try_init<F, E>(&self, f: F) -> Result<&T, E> where F: FnOnce() -> Result<T, E>
std::cellSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub const fn into_inner(self) -> Option<T>
std::cellSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub const fn new() -> OnceCell<T>
std::cellSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub fn set(&self, value: T) -> Result<(), T>
std::cellSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub fn take(&mut self) -> Option<T>
std::cellSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub fn try_insert(&self, value: T) -> Result<&T, (&T, T)>
std::cellSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub struct Ref<'b, T>
std::cellSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub fn clone(orig: &Ref<'b, T>) -> Ref<'b, T>
std::cellSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub fn filter_map<U, F>( orig: Ref<'b, T>, f: F, ) -> Result<Ref<'b, U>, Ref<'b, T>> where F: FnOnce(&T) -> Option<&U>, U: ?Sized
std::cellSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub const fn leak(orig: Ref<'b, T>) -> &'b T
std::cellSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub fn map<U, F>(orig: Ref<'b, T>, f: F) -> Ref<'b, U> where F: FnOnce(&T) -> &U, U: ?Sized
std::cellSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub fn map_split<U, V, F>(orig: Ref<'b, T>, f: F) -> (Ref<'b, U>, Ref<'b, V>) where F: FnOnce(&T) -> (&U, &V), U: ?Sized, V: ?Sized
std::cellSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub fn try_map<U, E>( orig: Ref<'b, T>, f: impl FnOnce(&T) -> Result<&U, E>, ) -> Result<Ref<'b, U>, (Ref<'b, T>, E)> where U: ?Sized
std::cellSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub struct RefCell<T>
std::cellSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub fn as_ptr(&self) -> *mut T
std::cellSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub fn borrow(&self) -> Ref<'_, T>
std::cellSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub fn borrow_mut(&self) -> RefMut<'_, T>
std::cellSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub fn get_mut(&mut self) -> &mut T
std::cellSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub const fn into_inner(self) -> T
std::cellSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub const fn new(value: T) -> RefCell<T>
std::cellSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub fn replace(&self, t: T) -> T
std::cellSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub fn replace_with<F>(&self, f: F) -> T where F: FnOnce(&mut T) -> T
std::cellSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub fn swap(&self, other: &RefCell<T>)
std::cellSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub fn take(&self) -> T
std::cellSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub fn try_borrow(&self) -> Result<Ref<'_, T>, BorrowError>
std::cellSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub fn try_borrow_mut(&self) -> Result<RefMut<'_, T>, BorrowMutError>
std::cellSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub unsafe fn try_borrow_unguarded(&self) -> Result<&T, BorrowError>
std::cellSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub const fn undo_leak(&mut self) -> &mut T
std::cellSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub struct RefMut<'b, T>
std::cellSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub fn filter_map<U, F>( orig: RefMut<'b, T>, f: F, ) -> Result<RefMut<'b, U>, RefMut<'b, T>> where F: FnOnce(&mut T) -> Option<&mut U>, U: ?Sized
std::cellSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub const fn leak(orig: RefMut<'b, T>) -> &'b mut T
std::cellSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub fn map<U, F>(orig: RefMut<'b, T>, f: F) -> RefMut<'b, U> where F: FnOnce(&mut T) -> &mut U, U: ?Sized
std::cellSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub fn map_split<U, V, F>( orig: RefMut<'b, T>, f: F, ) -> (RefMut<'b, U>, RefMut<'b, V>) where F: FnOnce(&mut T) -> (&mut U, &mut V), U: ?Sized, V: ?Sized
std::cellSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub fn try_map<U, E>( orig: RefMut<'b, T>, f: impl FnOnce(&mut T) -> Result<&mut U, E>, ) -> Result<RefMut<'b, U>, (RefMut<'b, T>, E)> where U: ?Sized
std::cellSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub struct SyncUnsafeCell<T>
std::cellSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub const fn get(&self) -> *mut T
std::cellSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub const fn get_mut(&mut self) -> &mut T
std::cellSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub const fn into_inner(self) -> T
std::cellSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub const fn new(value: T) -> SyncUnsafeCell<T>
std::cellSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub const fn raw_get(this: *const SyncUnsafeCell<T>) -> *mut T
std::cellSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub struct UnsafeCell<T>
std::cellSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub const unsafe fn as_mut_unchecked(&self) -> &mut T
std::cellSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub const unsafe fn as_ref_unchecked(&self) -> &T
std::cellSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub const fn from_mut(value: &mut T) -> &mut UnsafeCell<T>
std::cellSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub const fn get(&self) -> *mut T
std::cellSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub const fn get_mut(&mut self) -> &mut T
std::cellSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub const fn into_inner(self) -> T
std::cellSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub const fn new(value: T) -> UnsafeCell<T>
std::cellSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub const fn raw_get(this: *const UnsafeCell<T>) -> *mut T
std::cellSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.
pub const unsafe fn replace(&self, value: T) -> T
std::cellSource: doc.rust-lang.org, doc.rust-lang.org. JSON record. This entry is a card. Help write this page.