pub enum Access {
ThisAddress,
ThisContractAddress,
RepeatCounter,
PredicateData,
PredicateDataLen,
PredicateDataSlots,
PredicateExists,
}
Expand description
Operations for accessing input data.
Variants§
ThisAddress
0x30
: THIS
Get the content hash of this predicate.
This operation returns a list of words with a length of 4, representing the hash.
§Stack Output
[key]
ThisContractAddress
0x31
: THISC
Get the content hash of the contract this predicate belongs to.
This operation returns a list of words with a length of 4, representing the contract’s hash.
§Stack Output
[key]
RepeatCounter
PredicateData
0x3A
: DATA
Access a range of len
words starting from value_ix
within the
predicate data located at slot_ix
.
Returns a list of predicate data words with length equal to the specified len.
§Stack Input
[slot_ix, value_ix, len]
§Stack Output
[word, ...]
The stack output length depends on the value of the len
stack input word.
§Panics
- slot_ix is out of range.
- The range
value_ix..(value_ix + len)
is out of range.
PredicateDataLen
0x3B
: DLEN
Get the length of a the predicate data value located at slot_ix
.
§Stack Input
[slot_ix]
§Stack Output
[len]
§Panics
- slot_ix is out of range.
PredicateDataSlots
PredicateExists
Trait Implementations§
Source§impl Ord for Access
impl Ord for Access
Source§impl PartialOrd for Access
impl PartialOrd for Access
Source§impl TryFromBytes for Access
impl TryFromBytes for Access
Source§type Error = FromBytesError
type Error = FromBytesError
Represents any error that might occur while parsing an op from bytes.
impl Copy for Access
impl Eq for Access
impl StructuralPartialEq for Access
Auto Trait Implementations§
impl Freeze for Access
impl RefUnwindSafe for Access
impl Send for Access
impl Sync for Access
impl Unpin for Access
impl UnwindSafe for Access
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