pub struct ResumeContext(/* private fields */);Expand description
Context for Instruction::Resume.
The oparg consists of two parts:
ResumeContext::location: Indicates where the instruction occurs.ResumeContext::is_exception_depth1: Is the instruction is at except-depth 1.
Implementations§
Source§impl ResumeContext
impl ResumeContext
Source§impl ResumeContext
impl ResumeContext
Sourcepub const LOCATION_MASK: u32 = 0x3
pub const LOCATION_MASK: u32 = 0x3
Sourcepub const DEPTH1_MASK: u32 = 0x4
pub const DEPTH1_MASK: u32 = 0x4
pub const fn new(location: ResumeLocation, is_exception_depth1: bool) -> Self
Sourcepub fn location(&self) -> ResumeLocation
pub fn location(&self) -> ResumeLocation
Resume location is determined by Self::LOCATION_MASK.
Sourcepub const fn is_exception_depth1(&self) -> bool
pub const fn is_exception_depth1(&self) -> bool
True if the bit at Self::DEPTH1_MASK is on.
Trait Implementations§
Source§impl Clone for ResumeContext
impl Clone for ResumeContext
Source§fn clone(&self) -> ResumeContext
fn clone(&self) -> ResumeContext
Returns a duplicate 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 Display for ResumeContext
impl Display for ResumeContext
Source§impl From<ResumeContext> for u32
impl From<ResumeContext> for u32
Source§fn from(value: ResumeContext) -> Self
fn from(value: ResumeContext) -> Self
Converts to this type from the input type.
Source§impl From<ResumeContext> for usize
impl From<ResumeContext> for usize
Source§fn from(value: ResumeContext) -> Self
fn from(value: ResumeContext) -> Self
Converts to this type from the input type.
Source§impl From<ResumeLocation> for ResumeContext
impl From<ResumeLocation> for ResumeContext
Source§fn from(location: ResumeLocation) -> Self
fn from(location: ResumeLocation) -> Self
Converts to this type from the input type.
Source§impl From<u32> for ResumeContext
impl From<u32> for ResumeContext
impl Copy for ResumeContext
impl OpArgType for ResumeContext
Auto Trait Implementations§
impl Freeze for ResumeContext
impl RefUnwindSafe for ResumeContext
impl Send for ResumeContext
impl Sync for ResumeContext
impl Unpin for ResumeContext
impl UnsafeUnpin for ResumeContext
impl UnwindSafe for ResumeContext
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<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