Enum rustc_ast::ast::SelfKind [−][src]
pub enum SelfKind {
Value(Mutability),
Region(Option<Lifetime>, Mutability),
Explicit(P<Ty>, Mutability),
}Expand description
Alternative representation for Args describing self parameter of methods.
E.g., &mut self as in fn foo(&mut self).
Variants
Value(Mutability)self, mut self
Tuple Fields of Value
0: MutabilityRegion(Option<Lifetime>, Mutability)&'lt self, &'lt mut self
Tuple Fields of Region
0: Option<Lifetime>1: MutabilityExplicit(P<Ty>, Mutability)self: TYPE, mut self: TYPE
Tuple Fields of Explicit
0: P<Ty>1: MutabilityTrait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for SelfKind
impl !UnwindSafe for SelfKind
Blanket Implementations
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