pub struct ContractRegisters<const ZEROSTORE: bool> { /* private fields */ }Expand description
Registers used by contracts.
ZEROSTORE generic determines whether to zero x0 register on write instead of checking
register index on read. match loop usually performs better with branching, while threaded
execution benefits from zeroing.
Trait Implementations§
Source§impl<const ZEROSTORE: bool> Clone for ContractRegisters<ZEROSTORE>
impl<const ZEROSTORE: bool> Clone for ContractRegisters<ZEROSTORE>
Source§fn clone(&self) -> ContractRegisters<ZEROSTORE>
fn clone(&self) -> ContractRegisters<ZEROSTORE>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<const ZEROSTORE: bool> Copy for ContractRegisters<ZEROSTORE>
Source§impl<const ZEROSTORE: bool> Debug for ContractRegisters<ZEROSTORE>
impl<const ZEROSTORE: bool> Debug for ContractRegisters<ZEROSTORE>
Source§impl<const ZEROSTORE: bool> Default for ContractRegisters<ZEROSTORE>
impl<const ZEROSTORE: bool> Default for ContractRegisters<ZEROSTORE>
Source§fn default() -> ContractRegisters<ZEROSTORE>
fn default() -> ContractRegisters<ZEROSTORE>
Returns the “default value” for a type. Read more
Source§impl<const ZEROSTORE: bool> RegisterFile<ContractRegister> for ContractRegisters<ZEROSTORE>
impl<const ZEROSTORE: bool> RegisterFile<ContractRegister> for ContractRegisters<ZEROSTORE>
Source§fn read(&self, reg: ContractRegister) -> u64
fn read(&self, reg: ContractRegister) -> u64
Read register value
Source§fn write(&mut self, reg: ContractRegister, value: u64)
fn write(&mut self, reg: ContractRegister, value: u64)
Write register value
Auto Trait Implementations§
impl<const ZEROSTORE: bool> Freeze for ContractRegisters<ZEROSTORE>
impl<const ZEROSTORE: bool> RefUnwindSafe for ContractRegisters<ZEROSTORE>
impl<const ZEROSTORE: bool> Send for ContractRegisters<ZEROSTORE>
impl<const ZEROSTORE: bool> Sync for ContractRegisters<ZEROSTORE>
impl<const ZEROSTORE: bool> Unpin for ContractRegisters<ZEROSTORE>
impl<const ZEROSTORE: bool> UnsafeUnpin for ContractRegisters<ZEROSTORE>
impl<const ZEROSTORE: bool> UnwindSafe for ContractRegisters<ZEROSTORE>
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,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
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