pub enum Mutability {
Not,
Mut,
}Variants§
Implementations§
Source§impl Mutability
impl Mutability
pub fn invert(self) -> Self
Sourcepub fn prefix_str(self) -> &'static str
pub fn prefix_str(self) -> &'static str
Returns "" (empty string) or "mut " depending on the mutability.
Sourcepub fn ref_prefix_str(self) -> &'static str
pub fn ref_prefix_str(self) -> &'static str
Returns "&" or "&mut " depending on the mutability.
Sourcepub fn mutably_str(self) -> &'static str
pub fn mutably_str(self) -> &'static str
Returns "" (empty string) or "mutably " depending on the mutability.
Trait Implementations§
Source§impl Clone for Mutability
impl Clone for Mutability
Source§fn clone(&self) -> Mutability
fn clone(&self) -> Mutability
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 Mutability
impl Debug for Mutability
Source§impl Hash for Mutability
impl Hash for Mutability
Source§impl Ord for Mutability
impl Ord for Mutability
Source§fn cmp(&self, other: &Mutability) -> Ordering
fn cmp(&self, other: &Mutability) -> 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 Mutability
impl PartialEq for Mutability
Source§impl PartialOrd for Mutability
impl PartialOrd for Mutability
impl Copy for Mutability
impl Eq for Mutability
impl StructuralPartialEq for Mutability
Auto Trait Implementations§
impl Freeze for Mutability
impl RefUnwindSafe for Mutability
impl Send for Mutability
impl Sync for Mutability
impl Unpin for Mutability
impl UnwindSafe for Mutability
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