Enum valkyrie_ast::ControlKind
source · pub enum ControlKind {
Show 15 variants
Goto,
Raise,
Break,
Continue,
Fallthrough,
FallthroughUnchecked,
Return,
Resume,
YieldReturn,
YieldBreak,
YieldFrom,
YieldSend,
Await,
AwaitNever,
AwaitBlockOn,
}
Expand description
The control flow keywords
Variants§
Goto
goto ^label
, equivalent to call/cc
, can’t construct from frontend
Raise
raise ^label
Break
break ^label
Continue
continue ^label
, equivalent to goto
Fallthrough
fallthrough ^label
FallthroughUnchecked
fallthrough! ^label
Return
return ^LABEL
Resume
resume ^LABEL
YieldReturn
yield ^LABEL
YieldBreak
yield break ^LABEL
, yield! ^LABEL
YieldFrom
yield from iterator
, yield* iterator
YieldSend
let v = yield wait
, let v = yield?
Await
let v = await AWAITABLE
AwaitNever
await? AWAITABLE
AwaitBlockOn
violence { await! AWAITABLE }
Implementations§
Trait Implementations§
source§impl Clone for ControlKind
impl Clone for ControlKind
source§fn clone(&self) -> ControlKind
fn clone(&self) -> ControlKind
Returns a copy of the value. Read more
1.0.0 · 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 ControlKind
impl Debug for ControlKind
source§impl Display for ControlKind
impl Display for ControlKind
source§impl Hash for ControlKind
impl Hash for ControlKind
source§impl PartialEq for ControlKind
impl PartialEq for ControlKind
source§fn eq(&self, other: &ControlKind) -> bool
fn eq(&self, other: &ControlKind) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for ControlKind
impl Eq for ControlKind
impl StructuralPartialEq for ControlKind
Auto Trait Implementations§
impl RefUnwindSafe for ControlKind
impl Send for ControlKind
impl Sync for ControlKind
impl Unpin for ControlKind
impl UnwindSafe for ControlKind
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