#[non_exhaustive]pub struct ControlTransfer {
pub kind: ControlTransferKind,
pub label: Option<String>,
pub has_value: bool,
}Expand description
Control-transfer shell payload.
Models a control-flow edge that leaves the normal fallthrough path:
return, the loop-control verbs next/last/redo, or goto. Targets
are preserved by name where statically known; dynamic goto targets are
recorded by shape without resolution.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.kind: ControlTransferKindTransfer verb.
label: Option<String>Static target label, when the verb names one (next OUTER).
has_value: boolWhether the transfer carries a value payload (return $x).
Trait Implementations§
Source§impl Clone for ControlTransfer
impl Clone for ControlTransfer
Source§fn clone(&self) -> ControlTransfer
fn clone(&self) -> ControlTransfer
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 ControlTransfer
impl Debug for ControlTransfer
impl Eq for ControlTransfer
Source§impl PartialEq for ControlTransfer
impl PartialEq for ControlTransfer
Source§fn eq(&self, other: &ControlTransfer) -> bool
fn eq(&self, other: &ControlTransfer) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ControlTransfer
Auto Trait Implementations§
impl Freeze for ControlTransfer
impl RefUnwindSafe for ControlTransfer
impl Send for ControlTransfer
impl Sync for ControlTransfer
impl Unpin for ControlTransfer
impl UnsafeUnpin for ControlTransfer
impl UnwindSafe for ControlTransfer
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