pub struct FinalizeCore<N: Network, Command: CommandTrait<N>> { /* private fields */ }
Implementations§
Source§impl<N: Network, Command: CommandTrait<N>> FinalizeCore<N, Command>
impl<N: Network, Command: CommandTrait<N>> FinalizeCore<N, Command>
Sourcepub fn new(name: Identifier<N>) -> Self
pub fn new(name: Identifier<N>) -> Self
Initializes a new finalize with the given name.
Sourcepub const fn name(&self) -> &Identifier<N>
pub const fn name(&self) -> &Identifier<N>
Returns the name of the associated function.
Sourcepub fn input_types(&self) -> Vec<FinalizeType<N>>
pub fn input_types(&self) -> Vec<FinalizeType<N>>
Returns the finalize input types.
Sourcepub const fn num_writes(&self) -> u16
pub const fn num_writes(&self) -> u16
Returns the number of write commands.
Sourcepub const fn positions(&self) -> &HashMap<Identifier<N>, usize>
pub const fn positions(&self) -> &HashMap<Identifier<N>, usize>
Returns the mapping of Position
s to their index in commands
.
Source§impl<N: Network, Command: CommandTrait<N>> FinalizeCore<N, Command>
impl<N: Network, Command: CommandTrait<N>> FinalizeCore<N, Command>
Sourcepub fn add_command(&mut self, command: Command) -> Result<()>
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>
impl<N: Clone + Network, Command: Clone + CommandTrait<N>> Clone for FinalizeCore<N, Command>
Source§fn clone(&self) -> FinalizeCore<N, Command>
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)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<N: Network, Command: CommandTrait<N>> Debug for FinalizeCore<N, Command>
impl<N: Network, Command: CommandTrait<N>> Debug for FinalizeCore<N, Command>
Source§impl<N: Network, Command: CommandTrait<N>> Display for FinalizeCore<N, Command>
impl<N: Network, Command: CommandTrait<N>> Display for FinalizeCore<N, Command>
Source§impl<N: Network, Command: CommandTrait<N>> FromBytes for FinalizeCore<N, Command>
impl<N: Network, Command: CommandTrait<N>> FromBytes for FinalizeCore<N, Command>
Source§impl<N: Network, Command: CommandTrait<N>> FromStr for FinalizeCore<N, Command>
impl<N: Network, Command: CommandTrait<N>> FromStr for FinalizeCore<N, Command>
Source§impl<N: Network, Command: CommandTrait<N>> Parser for FinalizeCore<N, Command>
impl<N: Network, Command: CommandTrait<N>> Parser for FinalizeCore<N, Command>
Source§fn parse(string: &str) -> ParserResult<'_, Self>
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>
impl<N: PartialEq + Network, Command: PartialEq + CommandTrait<N>> PartialEq for FinalizeCore<N, Command>
Source§impl<N: Network, Command: CommandTrait<N>> ToBytes for FinalizeCore<N, Command>
impl<N: Network, Command: CommandTrait<N>> ToBytes for FinalizeCore<N, Command>
Source§impl<N: Network, Command: CommandTrait<N>> TypeName for FinalizeCore<N, Command>
impl<N: Network, Command: CommandTrait<N>> TypeName for FinalizeCore<N, Command>
impl<N: Eq + Network, Command: Eq + CommandTrait<N>> Eq for FinalizeCore<N, Command>
impl<N: Network, Command: CommandTrait<N>> StructuralPartialEq for FinalizeCore<N, Command>
Auto Trait Implementations§
impl<N, Command> Freeze for FinalizeCore<N, Command>
impl<N, Command> RefUnwindSafe for FinalizeCore<N, Command>
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>
impl<N, Command> UnwindSafe for FinalizeCore<N, Command>
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§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