YieldKind in rustc_ast::ast - Rust (original) (raw)
pub enum YieldKind {
Prefix(Option<Box<Expr>>),
Postfix(Box<Expr>),
}Expand description
The kind of yield expression
yield expr { … }
expr.yield { … }
Returns the expression inside the yield expression, if any.
For postfix yields, this is guaranteed to be Some.
Returns a mutable reference to the expression being yielded, if any.
Returns true if both yields are prefix or both are postfix.
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: 16 bytes
Size for each variant:
Prefix: 8 bytesPostfix: 8 bytes