pub struct FlatBlock {
pub statements: Vec<Statement>,
pub end: FlatBlockEnd,
}
Expand description
A block of statements. Unlike FlatBlock
, this has no reference information,
and no panic ending.
Fields§
§statements: Vec<Statement>
Statements sequence running one after the other in the block, in a linear flow.
Note: Inner blocks might end with a return
, which will exit the function in the middle.
Note: Match is a possible statement, which means it has control flow logic inside, but
after its execution is completed, the flow returns to the following statement of the block.
end: FlatBlockEnd
Describes how this block ends: returns to the caller or exits the function.
Implementations§
Trait Implementations§
Source§impl DebugWithDb<LoweredFormatter<'_>> for FlatBlock
impl DebugWithDb<LoweredFormatter<'_>> for FlatBlock
impl Eq for FlatBlock
impl StructuralPartialEq for FlatBlock
Auto Trait Implementations§
impl Freeze for FlatBlock
impl RefUnwindSafe for FlatBlock
impl Send for FlatBlock
impl Sync for FlatBlock
impl Unpin for FlatBlock
impl UnwindSafe for FlatBlock
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more