pub struct ProgramCounter(pub usize);Expand description
A program counter, which references an instruction in a compiled function. As there are no control flow instructions in the dice language, the program counter is not really an addressing mode, per se, but is still useful for various tools.
Tuple Fields§
§0: usizeTrait Implementations§
Source§impl CanAllocate for ProgramCounter
impl CanAllocate for ProgramCounter
Source§impl Clone for ProgramCounter
impl Clone for ProgramCounter
Source§fn clone(&self) -> ProgramCounter
fn clone(&self) -> ProgramCounter
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 ProgramCounter
impl Debug for ProgramCounter
Source§impl Default for ProgramCounter
impl Default for ProgramCounter
Source§fn default() -> ProgramCounter
fn default() -> ProgramCounter
Returns the “default value” for a type. Read more
Source§impl Display for ProgramCounter
impl Display for ProgramCounter
Source§impl From<ProgramCounter> for usize
impl From<ProgramCounter> for usize
Source§fn from(pc: ProgramCounter) -> Self
fn from(pc: ProgramCounter) -> Self
Converts to this type from the input type.
Source§impl From<usize> for ProgramCounter
impl From<usize> for ProgramCounter
Source§impl Hash for ProgramCounter
impl Hash for ProgramCounter
Source§impl Ord for ProgramCounter
impl Ord for ProgramCounter
Source§fn cmp(&self, other: &ProgramCounter) -> Ordering
fn cmp(&self, other: &ProgramCounter) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for ProgramCounter
impl PartialEq for ProgramCounter
Source§impl PartialOrd for ProgramCounter
impl PartialOrd for ProgramCounter
impl Copy for ProgramCounter
impl Eq for ProgramCounter
impl StructuralPartialEq for ProgramCounter
Auto Trait Implementations§
impl Freeze for ProgramCounter
impl RefUnwindSafe for ProgramCounter
impl Send for ProgramCounter
impl Sync for ProgramCounter
impl Unpin for ProgramCounter
impl UnwindSafe for ProgramCounter
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