[−][src]Struct tari_crypto::script::ExecutionStack
Implementations
impl ExecutionStack
[src]
pub fn new(items: Vec<StackItem>) -> Self
[src]
Return a new ExecutionStack
using the vector of StackItem in items
pub fn size(&self) -> usize
[src]
Returns the number of entries in the execution stack
pub fn peek(&self) -> Option<&StackItem>
[src]
Returns a reference to the top entry in the stack without affecting the stack
pub fn is_empty(&self) -> bool
[src]
Returns true if the stack is empty
pub fn pop(&mut self) -> Option<StackItem>
[src]
Pops the top item in the stack. If the stack is not empty, pop
returns the item, otherwise return None
if
it is empty.
pub fn as_bytes(&self) -> Vec<u8>
[src]
Return a binary array representation of the input stack
pub fn from_bytes(bytes: &[u8]) -> Result<Self, ScriptError>
[src]
pub fn push(&mut self, item: StackItem) -> Result<(), ScriptError>
[src]
Pushes the item onto the top of the stack. This function will only error if the new stack size exceeds the maximum allowed stack size, given by [MAX_STACK_SIZE]
Trait Implementations
impl Clone for ExecutionStack
[src]
fn clone(&self) -> ExecutionStack
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for ExecutionStack
[src]
impl Default for ExecutionStack
[src]
fn default() -> ExecutionStack
[src]
impl Eq for ExecutionStack
[src]
impl Hex for ExecutionStack
[src]
fn from_hex(hex: &str) -> Result<Self, HexError> where
Self: Sized,
[src]
Self: Sized,
fn to_hex(&self) -> String
[src]
impl PartialEq<ExecutionStack> for ExecutionStack
[src]
fn eq(&self, other: &ExecutionStack) -> bool
[src]
fn ne(&self, other: &ExecutionStack) -> bool
[src]
impl StructuralEq for ExecutionStack
[src]
impl StructuralPartialEq for ExecutionStack
[src]
Auto Trait Implementations
impl RefUnwindSafe for ExecutionStack
impl Send for ExecutionStack
impl Sync for ExecutionStack
impl Unpin for ExecutionStack
impl UnwindSafe for ExecutionStack
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> Clear for T where
T: InitializableFromZeroed + ?Sized,
[src]
T: InitializableFromZeroed + ?Sized,
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> Hex for T where
T: ByteArray,
[src]
T: ByteArray,
impl<T> InitializableFromZeroed for T where
T: Default,
[src]
T: Default,
unsafe fn initialize(place: *mut T)
[src]
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, 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>,