[−][src]Enum tari_crypto::script::Opcode
Variants
Push the associated 32-byte value onto the stack
Push a zero onto the stack
Hash to top stack element with the Blake256 hash function and push the result to the stack
Fail the script immediately. (Must be executed.)
Drops the top stack item
Duplicates the top stack item
Reverse rotation. The top stack item moves into 3rd place, abc => bca
Pop two items and push their sum
Pop two items and push the second minus the top
Pop the public key and then the signature. If the signature signs the script, push 0 to the stack, otherwise push 1
As for CheckSig, but aborts immediately if the signature is invalid. As opposed to Bitcoin, it pushes a zero to the stack if successful
Pushes 0, if the inputs are exactly equal, 1 otherwise
Pushes 0, if the inputs are exactly equal, aborts otherwise
Implementations
impl Opcode
[src]
pub fn read_next(bytes: &[u8]) -> Option<(Opcode, &[u8])>
[src]
Take a byte slice and read the next opcode from it, including any associated data. read_next
returns a tuple
of the deserialised opcode, and an updated slice that has the Opcode and data removed.
pub fn to_bytes<'a>(&self, array: &'a mut Vec<u8>) -> &'a [u8]
[src]
Convert an opcode into its binary representation and append it to the array. The function returns the byte slice that matches the opcode as a convenience
Trait Implementations
impl Clone for Opcode
[src]
impl Debug for Opcode
[src]
impl Display for Opcode
[src]
impl Eq for Opcode
[src]
impl PartialEq<Opcode> for Opcode
[src]
impl StructuralEq for Opcode
[src]
impl StructuralPartialEq for Opcode
[src]
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
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> Cast<U> for T where
U: FromCast<T>,
U: FromCast<T>,
fn cast(self) -> U
impl<T> From<T> for T
[src]
impl<T> FromBits<T> for T
fn from_bits(t: T) -> T
impl<T> FromCast<T> for T
fn from_cast(t: T) -> T
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> IntoBits<U> for T where
U: FromBits<T>,
U: FromBits<T>,
fn into_bits(self) -> U
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,