pub struct FinalizeCore<N: Network, Command: CommandTrait<N>> { /* private fields */ }

Implementations§

source§

impl<N: Network, Command: CommandTrait<N>> FinalizeCore<N, Command>

source

pub fn new(name: Identifier<N>) -> Self

Initializes a new finalize with the given name.

source

pub const fn name(&self) -> &Identifier<N>

Returns the name of the associated function.

source

pub const fn inputs(&self) -> &IndexSet<Input<N>>

Returns the finalize inputs.

source

pub fn input_types(&self) -> Vec<FinalizeType<N>>

Returns the finalize input types.

source

pub fn commands(&self) -> &[Command]

Returns the finalize commands.

source

pub const fn num_writes(&self) -> u16

Returns the number of write commands.

source

pub const fn positions(&self) -> &HashMap<Identifier<N>, usize>

Returns the mapping of Positions to their index in commands.

source§

impl<N: Network, Command: CommandTrait<N>> FinalizeCore<N, Command>

source

pub fn add_command(&mut self, command: Command) -> Result<()>

Adds the given command to finalize.

§Errors

This method will halt if the maximum number of commands has been reached.

Trait Implementations§

source§

impl<N: Clone + Network, Command: Clone + CommandTrait<N>> Clone for FinalizeCore<N, Command>

source§

fn clone(&self) -> FinalizeCore<N, Command>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<N: Network, Command: CommandTrait<N>> Debug for FinalizeCore<N, Command>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Prints the finalize as a string.

source§

impl<N: Network, Command: CommandTrait<N>> Display for FinalizeCore<N, Command>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Prints the finalize as a string.

source§

impl<N: Network, Command: CommandTrait<N>> FromBytes for FinalizeCore<N, Command>

source§

fn read_le<R: Read>(reader: R) -> IoResult<Self>

Reads the finalize from a buffer.

§

fn from_bytes_le(bytes: &[u8]) -> Result<Self, Error>
where Self: Sized,

Returns Self from a byte array in little-endian order.
source§

impl<N: Network, Command: CommandTrait<N>> FromStr for FinalizeCore<N, Command>

source§

fn from_str(string: &str) -> Result<Self>

Returns a finalize from a string literal.

§

type Err = Error

The associated error which can be returned from parsing.
source§

impl<N: Network, Command: CommandTrait<N>> Parser for FinalizeCore<N, Command>

source§

fn parse(string: &str) -> ParserResult<'_, Self>

Parses a string into finalize.

source§

impl<N: PartialEq + Network, Command: PartialEq + CommandTrait<N>> PartialEq for FinalizeCore<N, Command>

source§

fn eq(&self, other: &FinalizeCore<N, Command>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<N: Network, Command: CommandTrait<N>> ToBytes for FinalizeCore<N, Command>

source§

fn write_le<W: Write>(&self, writer: W) -> IoResult<()>

Writes the finalize to a buffer.

§

fn to_bytes_le(&self) -> Result<Vec<u8>, Error>
where Self: Sized,

Returns self as a byte array in little-endian order.
source§

impl<N: Network, Command: CommandTrait<N>> TypeName for FinalizeCore<N, Command>

source§

fn type_name() -> &'static str

Returns the type name as a string.

source§

impl<N: Eq + Network, Command: Eq + CommandTrait<N>> Eq for FinalizeCore<N, Command>

source§

impl<N: Network, Command: CommandTrait<N>> StructuralPartialEq for FinalizeCore<N, Command>

Auto Trait Implementations§

§

impl<N, Command> RefUnwindSafe for FinalizeCore<N, Command>
where Command: RefUnwindSafe, N: RefUnwindSafe, <N as Environment>::Field: RefUnwindSafe,

§

impl<N, Command> Send for FinalizeCore<N, Command>
where Command: Send,

§

impl<N, Command> Sync for FinalizeCore<N, Command>
where Command: Sync,

§

impl<N, Command> Unpin for FinalizeCore<N, Command>
where Command: Unpin, N: Unpin, <N as Environment>::Field: Unpin,

§

impl<N, Command> UnwindSafe for FinalizeCore<N, Command>
where Command: UnwindSafe, N: UnwindSafe, <N as Environment>::Field: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> Pointable for T

§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<T> ToSmolStr for T
where T: Display + ?Sized,

§

fn to_smolstr(&self) -> SmolStr

source§

impl<T> ToString for T
where T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V