pub enum TerminatorKind {
Goto {
target: BasicBlockIdx,
},
SwitchInt {
discr: Operand,
targets: SwitchTargets,
},
Resume,
Abort,
Return,
Unreachable,
Drop {
place: Place,
target: BasicBlockIdx,
unwind: UnwindAction,
},
Call {
func: Operand,
args: Vec<Operand>,
destination: Place,
target: Option<BasicBlockIdx>,
unwind: UnwindAction,
},
Assert {
cond: Operand,
expected: bool,
msg: AssertMessage,
target: BasicBlockIdx,
unwind: UnwindAction,
},
InlineAsm {
template: String,
operands: Vec<InlineAsmOperand>,
options: String,
line_spans: String,
destination: Option<BasicBlockIdx>,
unwind: UnwindAction,
},
}
Variants§
Goto
Fields
§
target: BasicBlockIdx
SwitchInt
Resume
Abort
Return
Unreachable
Drop
Call
Assert
InlineAsm
Implementations§
Source§impl TerminatorKind
impl TerminatorKind
pub fn successors(&self) -> Successors
pub fn unwind(&self) -> Option<&UnwindAction>
Trait Implementations§
Source§impl Clone for TerminatorKind
impl Clone for TerminatorKind
Source§fn clone(&self) -> TerminatorKind
fn clone(&self) -> TerminatorKind
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 TerminatorKind
impl Debug for TerminatorKind
Source§impl PartialEq for TerminatorKind
impl PartialEq for TerminatorKind
Source§impl Serialize for TerminatorKind
impl Serialize for TerminatorKind
impl Eq for TerminatorKind
impl StructuralPartialEq for TerminatorKind
Auto Trait Implementations§
impl Freeze for TerminatorKind
impl RefUnwindSafe for TerminatorKind
impl Send for TerminatorKind
impl Sync for TerminatorKind
impl Unpin for TerminatorKind
impl UnwindSafe for TerminatorKind
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 400 bytes
Size for each variant:
Goto
: 16 bytesSwitchInt
: 160 bytesResume
: 0 bytesAbort
: 0 bytesReturn
: 0 bytesUnreachable
: 0 bytesDrop
: 64 bytesCall
: 216 bytesAssert
: 400 bytesInlineAsm
: 136 bytes