pub enum SelfKind {
Value(Mutability),
Region(Option<Lifetime>, Mutability),
Explicit(P<Ty>, Mutability),
}
Expand description
Alternative representation for Arg
s describing self
parameter of methods.
E.g., &mut self
as in fn foo(&mut self)
.
Variants§
Value(Mutability)
self
, mut self
Region(Option<Lifetime>, Mutability)
&'lt self
, &'lt mut self
Explicit(P<Ty>, Mutability)
self: TYPE
, mut self: TYPE
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for SelfKind
impl !Send for SelfKind
impl !Sync for SelfKind
impl Unpin for SelfKind
impl !UnwindSafe for SelfKind
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
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 24 bytes
Size for each variant:
Value
: 1 byteRegion
: 19 bytesExplicit
: 15 bytes