#[non_exhaustive]
pub enum OpCode {
Reserved,
PushBytes0,
PushBytes32,
Return,
PushData1,
PushData2,
PushData4,
PushNum1,
}
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Reserved
Synonym for OP_RETURN.
PushBytes0
Push an empty array onto the stack.
PushBytes32
Push the next 32 bytes as an array onto the stack.
Return
Fail the script immediately.
PushData1
Read the next byte as N; push the next N bytes as an array onto the stack.
PushData2
Read the next 2 bytes as N; push the next N bytes as an array onto the stack.
PushData4
Read the next 4 bytes as N; push the next N bytes as an array onto the stack.
PushNum1
Push the array 0x01
onto the stack.
Trait Implementations§
source§impl PartialEq<OpCode> for OpCode
impl PartialEq<OpCode> for OpCode
source§impl StrictDecode for OpCode
impl StrictDecode for OpCode
fn strict_decode(reader: &mut impl TypedRead) -> Result<OpCode, DecodeError>
source§impl StrictDumb for OpCode
impl StrictDumb for OpCode
fn strict_dumb() -> OpCode
source§impl StrictEncode for OpCode
impl StrictEncode for OpCode
fn strict_encode<W>(&self, writer: W) -> Result<W, Error>where W: TypedWrite,
source§impl StrictEnum for OpCode
impl StrictEnum for OpCode
fn from_variant_name(name: &FieldName) -> Result<Self, VariantError<&FieldName>>
fn strict_type_info() -> TypeInfo<Self>
source§impl StrictSum for OpCode
impl StrictSum for OpCode
const ALL_VARIANTS: &'static [(u8, &'static str)] = &[(Self::PushBytes0 as u8, "pushBytes0"), (Self::PushBytes32 as u8, "pushBytes32"), (Self::Reserved as u8, "reserved"), (Self::Return as u8, "return"), (Self::PushData1 as u8, "pushData1"), (Self::PushData2 as u8, "pushData2"), (Self::PushData4 as u8, "pushData4"), (Self::PushNum1 as u8, "pushNum1")]
fn variant_name(&self) -> &'static str
fn strict_check_variants()
fn variant_name_by_tag(tag: u8) -> Option<FieldName>
fn variant_ord(&self) -> u8
source§impl StrictType for OpCode
impl StrictType for OpCode
const STRICT_LIB_NAME: &'static str = LIB_NAME_BITCOIN
fn strict_name() -> Option<TypeName>
impl Copy for OpCode
impl Eq for OpCode
impl StructuralEq for OpCode
impl StructuralPartialEq for OpCode
Auto Trait Implementations§
impl RefUnwindSafe for OpCode
impl Send for OpCode
impl Sync for OpCode
impl Unpin 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
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.