Struct ach_util::refer::MemoryRefer
source · [−]pub struct MemoryRefer(_);Implementations
sourceimpl MemoryRefer
impl MemoryRefer
pub const UNINITIALIZED: Self
pub const INITIALIZING: Self
pub const INITIALIZED: Self
pub const ERASING: Self
pub const REF1: Self
sourcepub const fn new() -> MemoryRefer
pub const fn new() -> MemoryRefer
Uninitialized
pub fn state(&self) -> MemoryState
pub fn set_state(&mut self, val: MemoryState) -> Result<(), MemoryState>
pub fn can_refer(&self) -> bool
pub fn ref_num(&self) -> Result<usize, MemoryState>
pub fn ref_add(&mut self) -> Result<(), MemoryState>
pub fn ref_sub(&mut self) -> Result<(), MemoryState>
Trait Implementations
sourceimpl Clone for MemoryRefer
impl Clone for MemoryRefer
sourcefn clone(&self) -> MemoryRefer
fn clone(&self) -> MemoryRefer
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Debug for MemoryRefer
impl Debug for MemoryRefer
sourceimpl From<MemoryRefer> for u32
impl From<MemoryRefer> for u32
sourcefn from(s: MemoryRefer) -> Self
fn from(s: MemoryRefer) -> Self
Performs the conversion.
sourceimpl From<MemoryState> for MemoryRefer
impl From<MemoryState> for MemoryRefer
sourcefn from(s: MemoryState) -> Self
fn from(s: MemoryState) -> Self
Performs the conversion.
sourceimpl Ord for MemoryRefer
impl Ord for MemoryRefer
sourceimpl PartialEq<MemoryRefer> for MemoryRefer
impl PartialEq<MemoryRefer> for MemoryRefer
sourcefn eq(&self, other: &MemoryRefer) -> bool
fn eq(&self, other: &MemoryRefer) -> bool
This method tests for self and other values to be equal, and is used
by ==. Read more
sourcefn ne(&self, other: &MemoryRefer) -> bool
fn ne(&self, other: &MemoryRefer) -> bool
This method tests for !=.
sourceimpl PartialOrd<MemoryRefer> for MemoryRefer
impl PartialOrd<MemoryRefer> for MemoryRefer
sourcefn partial_cmp(&self, other: &MemoryRefer) -> Option<Ordering>
fn partial_cmp(&self, other: &MemoryRefer) -> Option<Ordering>
This method returns an ordering between self and other values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
impl Copy for MemoryRefer
impl Eq for MemoryRefer
impl StructuralEq for MemoryRefer
impl StructuralPartialEq for MemoryRefer
Auto Trait Implementations
impl RefUnwindSafe for MemoryRefer
impl Send for MemoryRefer
impl Sync for MemoryRefer
impl Unpin for MemoryRefer
impl UnwindSafe for MemoryRefer
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more