Skip to main content

Terminal

Enum Terminal 

Source
pub enum Terminal {
Show 22 variants Unsupported { id: EvaluationOrder, loc: Option<SourceLocation>, }, Unreachable { id: EvaluationOrder, loc: Option<SourceLocation>, }, Throw { value: Place, id: EvaluationOrder, loc: Option<SourceLocation>, }, Return { value: Place, return_variant: ReturnVariant, id: EvaluationOrder, loc: Option<SourceLocation>, effects: Option<Vec<AliasingEffect>>, }, Goto { block: BlockId, variant: GotoVariant, id: EvaluationOrder, loc: Option<SourceLocation>, }, If { test: Place, consequent: BlockId, alternate: BlockId, fallthrough: BlockId, id: EvaluationOrder, loc: Option<SourceLocation>, }, Branch { test: Place, consequent: BlockId, alternate: BlockId, fallthrough: BlockId, id: EvaluationOrder, loc: Option<SourceLocation>, }, Switch { test: Place, cases: Vec<Case>, fallthrough: BlockId, id: EvaluationOrder, loc: Option<SourceLocation>, }, DoWhile { loop_block: BlockId, test: BlockId, fallthrough: BlockId, id: EvaluationOrder, loc: Option<SourceLocation>, }, While { test: BlockId, loop_block: BlockId, fallthrough: BlockId, id: EvaluationOrder, loc: Option<SourceLocation>, }, For { init: BlockId, test: BlockId, update: Option<BlockId>, loop_block: BlockId, fallthrough: BlockId, id: EvaluationOrder, loc: Option<SourceLocation>, }, ForOf { init: BlockId, test: BlockId, loop_block: BlockId, fallthrough: BlockId, id: EvaluationOrder, loc: Option<SourceLocation>, }, ForIn { init: BlockId, loop_block: BlockId, fallthrough: BlockId, id: EvaluationOrder, loc: Option<SourceLocation>, }, Logical { operator: LogicalOperator, test: BlockId, fallthrough: BlockId, id: EvaluationOrder, loc: Option<SourceLocation>, }, Ternary { test: BlockId, fallthrough: BlockId, id: EvaluationOrder, loc: Option<SourceLocation>, }, Optional { optional: bool, test: BlockId, fallthrough: BlockId, id: EvaluationOrder, loc: Option<SourceLocation>, }, Label { block: BlockId, fallthrough: BlockId, id: EvaluationOrder, loc: Option<SourceLocation>, }, Sequence { block: BlockId, fallthrough: BlockId, id: EvaluationOrder, loc: Option<SourceLocation>, }, MaybeThrow { continuation: BlockId, handler: Option<BlockId>, id: EvaluationOrder, loc: Option<SourceLocation>, effects: Option<Vec<AliasingEffect>>, }, Try { block: BlockId, handler_binding: Option<Place>, handler: BlockId, fallthrough: BlockId, id: EvaluationOrder, loc: Option<SourceLocation>, }, Scope { fallthrough: BlockId, block: BlockId, scope: ScopeId, id: EvaluationOrder, loc: Option<SourceLocation>, }, PrunedScope { fallthrough: BlockId, block: BlockId, scope: ScopeId, id: EvaluationOrder, loc: Option<SourceLocation>, },
}

Variants§

§

Unsupported

§

Unreachable

§

Throw

§

Return

§

Goto

§

If

Fields

§test: Place
§consequent: BlockId
§alternate: BlockId
§fallthrough: BlockId
§

Branch

Fields

§test: Place
§consequent: BlockId
§alternate: BlockId
§fallthrough: BlockId
§

Switch

Fields

§test: Place
§cases: Vec<Case>
§fallthrough: BlockId
§

DoWhile

Fields

§loop_block: BlockId
§test: BlockId
§fallthrough: BlockId
§

While

Fields

§test: BlockId
§loop_block: BlockId
§fallthrough: BlockId
§

For

Fields

§init: BlockId
§test: BlockId
§update: Option<BlockId>
§loop_block: BlockId
§fallthrough: BlockId
§

ForOf

Fields

§init: BlockId
§test: BlockId
§loop_block: BlockId
§fallthrough: BlockId
§

ForIn

Fields

§init: BlockId
§loop_block: BlockId
§fallthrough: BlockId
§

Logical

§

Ternary

§

Optional

Fields

§optional: bool
§test: BlockId
§fallthrough: BlockId
§

Label

§

Sequence

§

MaybeThrow

§

Try

Fields

§block: BlockId
§handler_binding: Option<Place>
§handler: BlockId
§fallthrough: BlockId
§

Scope

Fields

§fallthrough: BlockId
§block: BlockId
§scope: ScopeId
§

PrunedScope

Fields

§fallthrough: BlockId
§block: BlockId
§scope: ScopeId

Implementations§

Source§

impl Terminal

Source

pub fn evaluation_order(&self) -> EvaluationOrder

Get the evaluation order of this terminal

Source

pub fn loc(&self) -> Option<&SourceLocation>

Get the source location of this terminal

Source

pub fn set_evaluation_order(&mut self, new_id: EvaluationOrder)

Set the evaluation order of this terminal

Trait Implementations§

Source§

impl Clone for Terminal

Source§

fn clone(&self) -> Terminal

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Terminal

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.