#[non_exhaustive]pub struct StatementModifierShell {
pub modifier: StatementModifierKind,
pub condition_range: SourceLocation,
pub label: Option<String>,
}Expand description
Statement-modifier shell payload.
Models a postfix statement modifier (STMT if COND, STMT while COND,
etc.). The modifier verb decides whether the construct is a branch or a
loop; the condition range anchors the controlling expression.
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.modifier: StatementModifierKindModifier verb.
condition_range: SourceLocationSource range of the controlling condition/list expression.
label: Option<String>Controlling label from an enclosing LABEL: statement, preserved for
loop-form modifiers (while/until/for). None for branch-form
modifiers (if/unless), which are not loop targets.
Trait Implementations§
Source§impl Clone for StatementModifierShell
impl Clone for StatementModifierShell
Source§fn clone(&self) -> StatementModifierShell
fn clone(&self) -> StatementModifierShell
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 StatementModifierShell
impl Debug for StatementModifierShell
impl Eq for StatementModifierShell
Source§impl PartialEq for StatementModifierShell
impl PartialEq for StatementModifierShell
Source§fn eq(&self, other: &StatementModifierShell) -> bool
fn eq(&self, other: &StatementModifierShell) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for StatementModifierShell
Auto Trait Implementations§
impl Freeze for StatementModifierShell
impl RefUnwindSafe for StatementModifierShell
impl Send for StatementModifierShell
impl Sync for StatementModifierShell
impl Unpin for StatementModifierShell
impl UnsafeUnpin for StatementModifierShell
impl UnwindSafe for StatementModifierShell
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