pub trait NodeWrapper<T> {
// Required methods
fn calculate_wrapped_nodes(
&self,
parameters: &HashMap<&str, Parameter>,
) -> Result<T, CalculationError>;
fn serialise(self) -> Result<Vec<u8>, SerialisationError>;
// Provided method
fn calculate(
&self,
parameters: Option<&HashMap<&str, Parameter>>,
) -> Result<T, CalculationError> { ... }
}Required Methods§
Sourcefn calculate_wrapped_nodes(
&self,
parameters: &HashMap<&str, Parameter>,
) -> Result<T, CalculationError>
fn calculate_wrapped_nodes( &self, parameters: &HashMap<&str, Parameter>, ) -> Result<T, CalculationError>
This method triggers a calculation based on the instructions given by the nodes underlying
the NodeWrapper
Sourcefn serialise(self) -> Result<Vec<u8>, SerialisationError>
fn serialise(self) -> Result<Vec<u8>, SerialisationError>
This method serialises the whole instruction covered by this NodeWrapper into a binary format that can be deserialised into a crate::InstructionWrapper.
Provided Methods§
Sourcefn calculate(
&self,
parameters: Option<&HashMap<&str, Parameter>>,
) -> Result<T, CalculationError>
fn calculate( &self, parameters: Option<&HashMap<&str, Parameter>>, ) -> Result<T, CalculationError>
This method triggers a calculation based on the instructions given by the nodes underlying
the NodeWrapper