pub struct ChoiceDecl {
pub name: Identifier,
pub consuming: Consuming,
pub return_ty: TypeAnnotation,
pub params: Vec<FieldDecl>,
pub controllers: Vec<Expr>,
pub observers: Vec<Expr>,
pub authority_exprs: Vec<Expr>,
pub body: Option<Expr>,
pub pos: Pos,
pub span: Span,
}Fields§
§name: IdentifierChoice name.
consuming: ConsumingConsuming mode parsed from the choice header.
return_ty: TypeAnnotationStructured return type parse state.
params: Vec<FieldDecl>Choice parameter fields in source order.
controllers: Vec<Expr>Comma-separated controller expressions.
observers: Vec<Expr>Choice observers, if any.
Choice authority expressions from authority metadata clauses.
body: Option<Expr>Choice body after do; None when the parser did not find one.
pos: PosPosition of the choice token.
span: SpanSpan of the whole choice declaration.
Trait Implementations§
Source§impl Clone for ChoiceDecl
impl Clone for ChoiceDecl
Source§fn clone(&self) -> ChoiceDecl
fn clone(&self) -> ChoiceDecl
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 moreSource§impl Debug for ChoiceDecl
impl Debug for ChoiceDecl
impl Eq for ChoiceDecl
Source§impl PartialEq for ChoiceDecl
impl PartialEq for ChoiceDecl
Source§fn eq(&self, other: &ChoiceDecl) -> bool
fn eq(&self, other: &ChoiceDecl) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ChoiceDecl
Auto Trait Implementations§
impl Freeze for ChoiceDecl
impl RefUnwindSafe for ChoiceDecl
impl Send for ChoiceDecl
impl Sync for ChoiceDecl
impl Unpin for ChoiceDecl
impl UnsafeUnpin for ChoiceDecl
impl UnwindSafe for ChoiceDecl
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