pub struct FinalizeTypes<N: Network> { /* private fields */ }
Implementations§
Source§impl<N: Network> FinalizeTypes<N>
impl<N: Network> FinalizeTypes<N>
Sourcepub fn matches_struct(
&self,
stack: &(impl StackMatches<N> + StackProgram<N>),
operands: &[Operand<N>],
struct_: &StructType<N>,
) -> Result<()>
pub fn matches_struct( &self, stack: &(impl StackMatches<N> + StackProgram<N>), operands: &[Operand<N>], struct_: &StructType<N>, ) -> Result<()>
Checks that the given operands matches the layout of the struct. The ordering of the operands matters.
Sourcepub fn matches_array(
&self,
stack: &(impl StackMatches<N> + StackProgram<N>),
operands: &[Operand<N>],
array_type: &ArrayType<N>,
) -> Result<()>
pub fn matches_array( &self, stack: &(impl StackMatches<N> + StackProgram<N>), operands: &[Operand<N>], array_type: &ArrayType<N>, ) -> Result<()>
Checks that the given operands matches the layout of the array.
Source§impl<N: Network> FinalizeTypes<N>
impl<N: Network> FinalizeTypes<N>
Sourcepub fn from_finalize(
stack: &(impl StackMatches<N> + StackProgram<N>),
finalize: &Finalize<N>,
) -> Result<Self>
pub fn from_finalize( stack: &(impl StackMatches<N> + StackProgram<N>), finalize: &Finalize<N>, ) -> Result<Self>
Initializes a new instance of FinalizeTypes
for the given finalize.
Checks that the given finalize is well-formed for the given stack.
Sourcepub fn contains(&self, register: &Register<N>) -> bool
pub fn contains(&self, register: &Register<N>) -> bool
Returns true
if the given register exists.
Sourcepub fn is_input(&self, register: &Register<N>) -> bool
pub fn is_input(&self, register: &Register<N>) -> bool
Returns true
if the given register corresponds to an input register.
Sourcepub fn get_type_from_operand(
&self,
stack: &(impl StackMatches<N> + StackProgram<N>),
operand: &Operand<N>,
) -> Result<FinalizeType<N>>
pub fn get_type_from_operand( &self, stack: &(impl StackMatches<N> + StackProgram<N>), operand: &Operand<N>, ) -> Result<FinalizeType<N>>
Returns the type of the given operand.
Sourcepub fn get_type(
&self,
stack: &(impl StackMatches<N> + StackProgram<N>),
register: &Register<N>,
) -> Result<FinalizeType<N>>
pub fn get_type( &self, stack: &(impl StackMatches<N> + StackProgram<N>), register: &Register<N>, ) -> Result<FinalizeType<N>>
Returns the type of the given register.
Trait Implementations§
Source§impl<N: Clone + Network> Clone for FinalizeTypes<N>
impl<N: Clone + Network> Clone for FinalizeTypes<N>
Source§fn clone(&self) -> FinalizeTypes<N>
fn clone(&self) -> FinalizeTypes<N>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<N: Default + Network> Default for FinalizeTypes<N>
impl<N: Default + Network> Default for FinalizeTypes<N>
Source§fn default() -> FinalizeTypes<N>
fn default() -> FinalizeTypes<N>
Returns the “default value” for a type. Read more
impl<N: Eq + Network> Eq for FinalizeTypes<N>
impl<N: Network> StructuralPartialEq for FinalizeTypes<N>
Auto Trait Implementations§
impl<N> Freeze for FinalizeTypes<N>
impl<N> RefUnwindSafe for FinalizeTypes<N>
impl<N> Send for FinalizeTypes<N>
impl<N> Sync for FinalizeTypes<N>
impl<N> Unpin for FinalizeTypes<N>
impl<N> UnwindSafe for FinalizeTypes<N>
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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