pub enum Mutability {
Immutable,
Reassigned,
AddressTaken,
Captured,
}Expand description
Статус изменяемости переменной. Показывает, может ли переменная быть изменена, была ли она переопределена, взят ли у неё адрес или захвачена ли она в замыкании/горутине.
Variants§
Immutable
Переменная неизменяема (например, объявлена как let x = …)
Reassigned
Переменная была переопределена (например, x = …)
AddressTaken
У переменной был взят адрес (например, &x)
Captured
Переменная была захвачена в замыкании или горутине
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 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for Mutability
Source§impl Debug for Mutability
impl Debug for Mutability
Source§impl<'de> Deserialize<'de> for Mutability
impl<'de> Deserialize<'de> for Mutability
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Mutability
Source§impl Hash for Mutability
impl Hash for Mutability
Source§impl PartialEq for Mutability
impl PartialEq for Mutability
Source§fn eq(&self, other: &Mutability) -> bool
fn eq(&self, other: &Mutability) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for Mutability
impl Serialize 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 UnsafeUnpin 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