SelfKind in rustc_ast::ast - Rust (original) (raw)
pub enum SelfKind {
Value(Mutability),
Region(Option<Lifetime>, Mutability),
Pinned(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)
.
self
, mut self
&'lt self
, &'lt mut self
&'lt pin const self
, &'lt pin mut self
self: TYPE
, mut self: TYPE
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 bytesPinned
: 19 bytesExplicit
: 15 bytes