Struct dfir_lang::graph::OperatorInstance  
source · pub struct OperatorInstance {
    pub op_constraints: &'static OperatorConstraints,
    pub input_ports: Vec<PortIndexValue>,
    pub output_ports: Vec<PortIndexValue>,
    pub singletons_referenced: Vec<Ident>,
    pub generics: OpInstGenerics,
    pub arguments_pre: Punctuated<Expr, Comma>,
    pub arguments_raw: TokenStream,
}Expand description
Meta-data relating to operators which may be useful throughout the compilation process.
This data can be generated from the graph, but it is useful to have it readily available
pre-computed as many algorithms use the same info. Stuff like port names, arguments, and the
OperatorConstraints for the operator.
Because it is derived from the graph itself, there can be “cache invalidation”-esque issues if this data is not kept in sync with the graph.
Fields§
§op_constraints: &'static OperatorConstraintsName of the operator (will match OperatorConstraints::name).
input_ports: Vec<PortIndexValue>Port values used as this operator’s input.
output_ports: Vec<PortIndexValue>Port values used as this operator’s output.
singletons_referenced: Vec<Ident>Singleton references within the operator arguments.
generics: OpInstGenericsGeneric arguments.
arguments_pre: Punctuated<Expr, Comma>Arguments provided by the user into the operator as arguments.
I.e. the a, b, c in -> my_op(a, b, c) -> .
These arguments do not include singleton postprocessing codegen. Instead use
ops::WriteContextArgs::arguments.
arguments_raw: TokenStreamUnparsed arguments, for singleton parsing.
Trait Implementations§
source§impl Clone for OperatorInstance
 
impl Clone for OperatorInstance
source§fn clone(&self) -> OperatorInstance
 
fn clone(&self) -> OperatorInstance
1.0.0 · source§fn clone_from(&mut self, source: &Self)
 
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for OperatorInstance
impl !RefUnwindSafe for OperatorInstance
impl !Send for OperatorInstance
impl !Sync for OperatorInstance
impl Unpin for OperatorInstance
impl !UnwindSafe for OperatorInstance
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
source§impl<T> CloneToUninit for Twhere
    T: Clone,
 
impl<T> CloneToUninit for Twhere
    T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
 
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit)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>
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>
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