pub enum MemoryState {
Uninitialized = 0,
Initializing = 1,
Initialized = 2,
Erasing = 3,
Regaining = 5,
Unknown = 6,
}Variants§
Uninitialized = 0
Initializing = 1
Initialized = 2
Erasing = 3
Regaining = 5
被多次借用时,获取独占权
Unknown = 6
Implementations§
Source§impl MemoryState
impl MemoryState
pub fn is_uninitialized(&self) -> bool
pub fn is_initializing(&self) -> bool
pub fn is_initialized(&self) -> bool
pub fn is_erasing(&self) -> bool
pub fn is_regaining(&self) -> bool
pub fn is_unknown(&self) -> bool
pub fn is_transient(&self) -> bool
Trait Implementations§
Source§impl Clone for MemoryState
impl Clone for MemoryState
Source§fn clone(&self) -> MemoryState
fn clone(&self) -> MemoryState
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MemoryState
impl Debug for MemoryState
Source§impl From<MemoryState> for MemoryRefer
impl From<MemoryState> for MemoryRefer
Source§fn from(s: MemoryState) -> Self
fn from(s: MemoryState) -> Self
Converts to this type from the input type.
Source§impl From<MemoryState> for u8
impl From<MemoryState> for u8
Source§fn from(s: MemoryState) -> Self
fn from(s: MemoryState) -> Self
Converts to this type from the input type.
Source§impl From<u8> for MemoryState
impl From<u8> for MemoryState
Source§impl Ord for MemoryState
impl Ord for MemoryState
Source§fn cmp(&self, other: &MemoryState) -> Ordering
fn cmp(&self, other: &MemoryState) -> Ordering
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
Source§impl PartialEq for MemoryState
impl PartialEq for MemoryState
Source§impl PartialOrd for MemoryState
impl PartialOrd for MemoryState
impl Copy for MemoryState
impl Eq for MemoryState
impl StructuralPartialEq for MemoryState
Auto Trait Implementations§
impl Freeze for MemoryState
impl RefUnwindSafe for MemoryState
impl Send for MemoryState
impl Sync for MemoryState
impl Unpin for MemoryState
impl UnwindSafe for MemoryState
Blanket Implementations§
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
Mutably borrows from an owned value. Read more