pub struct ComposeImpl { /* private fields */ }Expand description
Implementation of a “function composition” FuncImpl
Implementations§
Source§impl ComposeImpl
impl ComposeImpl
Sourcepub fn new(
type_info_directory: &TypeInfoDirectory,
in_type: TypeId,
middle_type: TypeId,
ret_type: TypeId,
) -> ComposeImpl
pub fn new( type_info_directory: &TypeInfoDirectory, in_type: TypeId, middle_type: TypeId, ret_type: TypeId, ) -> ComposeImpl
Given a TypeInfoDirectory, the input type, a middle type, and a return type,
yields a ComposeImpl of type (in -> middle) -> (middle -> return) -> (in -> return).
Trait Implementations§
Source§impl Clone for ComposeImpl
impl Clone for ComposeImpl
Source§fn clone(&self) -> ComposeImpl
fn clone(&self) -> ComposeImpl
Returns a duplicate 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 FuncImpl for ComposeImpl
impl FuncImpl for ComposeImpl
Source§fn evaluate(
&self,
state: &mut InterpreterState<'_>,
args: Vec<TermReference>,
) -> (TermReference, NewlyEvaluatedTerms)
fn evaluate( &self, state: &mut InterpreterState<'_>, args: Vec<TermReference>, ) -> (TermReference, NewlyEvaluatedTerms)
Given a handle on the current
InterpreterState (primarily useful if additional terms
need to be evaluated / looked up) and the collection of TermReference arguments to
apply this function implementation to, yields a TermReference to the result, along
with a collection of any NewlyEvaluatedTerms which may have arisen as part of the
implementation of this method. See func_impl.rs in the source for sample implementations.Source§impl HasFuncSignature for ComposeImpl
impl HasFuncSignature for ComposeImpl
Source§fn required_arg_types(&self) -> Vec<TypeId> ⓘ
fn required_arg_types(&self) -> Vec<TypeId> ⓘ
Gets the list of required argument types for the implemented function.
Source§fn ready_to_evaluate(&self, args: &Vec<TermReference>) -> bool
fn ready_to_evaluate(&self, args: &Vec<TermReference>) -> bool
Given a collection of
TermReferences, determines whether
we have sufficiently-many arguments to fully evaluate this function.Source§fn func_type(&self, type_info_directory: &TypeInfoDirectory) -> TypeId
fn func_type(&self, type_info_directory: &TypeInfoDirectory) -> TypeId
Given a
TypeInfoDirectory, obtains the TypeId which
corresponds to the type of this implemented function.Auto Trait Implementations§
impl Freeze for ComposeImpl
impl RefUnwindSafe for ComposeImpl
impl Send for ComposeImpl
impl Sync for ComposeImpl
impl Unpin for ComposeImpl
impl UnwindSafe for ComposeImpl
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