pub struct ProgramCounter(/* private fields */);Expand description
Denotes a program counter in an instruction sequence.
Implementations§
Source§impl ProgramCounter
impl ProgramCounter
Sourcepub fn offset(&self, offset: i32) -> Result<Self, InvalidOffset>
👎Deprecated: Use the + operator instead.
pub fn offset(&self, offset: i32) -> Result<Self, InvalidOffset>
+ operator instead.Creates a new program counter based on the given value with a given offset.
§Errors
InvalidOffsetIf the resulting value is too large to fit into aProgramCounter.
Sourcepub fn offset_i16(&self, offset: i16) -> Result<Self, InvalidOffset>
👎Deprecated: Use the + operator instead.
pub fn offset_i16(&self, offset: i16) -> Result<Self, InvalidOffset>
+ operator instead.Creates a new program counter based on the given value with a given offset (in i16).
§Errors
InvalidOffsetIf the resulting value is too large to fit into aProgramCounter.
Trait Implementations§
Source§impl Add<i16> for ProgramCounter
impl Add<i16> for ProgramCounter
Source§impl Add<i32> for ProgramCounter
impl Add<i32> for ProgramCounter
Source§impl Add<u16> for ProgramCounter
impl Add<u16> for ProgramCounter
Source§impl Clone for ProgramCounter
impl Clone for ProgramCounter
Source§fn clone(&self) -> ProgramCounter
fn clone(&self) -> ProgramCounter
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 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 u16
impl From<ProgramCounter> for u16
Source§fn from(value: ProgramCounter) -> Self
fn from(value: ProgramCounter) -> Self
Converts to this type from the input type.
Source§impl From<u16> for ProgramCounter
impl From<u16> 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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<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> 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