pub struct OpCode(/* private fields */);Expand description
An OpenTimestamps opcode.
This is always a valid opcode.
Implementations§
Source§impl OpCode
impl OpCode
Sourcepub const fn has_immediate(&self) -> bool
pub const fn has_immediate(&self) -> bool
Returns true when the opcode requires an immediate operand.
Sourcepub const fn is_control(&self) -> bool
pub const fn is_control(&self) -> bool
Returns true for control opcodes.
Sourcepub const fn as_digest(&self) -> Option<DigestOp>
pub const fn as_digest(&self) -> Option<DigestOp>
Returns the digest opcode wrapper, if applicable.
Source§impl OpCode
impl OpCode
Sourcepub const ATTESTATION: Self
pub const ATTESTATION: Self
The 0x00 (“ATTESTATION”) opcode.
Trait Implementations§
Source§impl Decode for OpCode
impl Decode for OpCode
fn decode(decoder: &mut impl Decoder) -> Result<Self, DecodeError>
Source§fn decode_trailing(
decoder: &mut impl Decoder,
) -> Result<Option<Self>, DecodeError>
fn decode_trailing( decoder: &mut impl Decoder, ) -> Result<Option<Self>, DecodeError>
Source§impl Ord for OpCode
impl Ord for OpCode
Source§impl PartialOrd for OpCode
impl PartialOrd for OpCode
impl Copy for OpCode
impl Eq for OpCode
impl StructuralPartialEq for OpCode
Auto Trait Implementations§
impl Freeze for OpCode
impl RefUnwindSafe for OpCode
impl Send for OpCode
impl Sync for OpCode
impl Unpin for OpCode
impl UnsafeUnpin for OpCode
impl UnwindSafe for OpCode
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