pub struct SymTable {
pub funcs: Vec<FunctionDef>,
pub tasks: Vec<TaskDef>,
pub classes: Vec<ClassDef>,
pub vars: Vec<VarDef>,
pub results: HashMap<String, String>,
}
Expand description
Defines the SymTable, which is like a symbol table (very much so, even) but now specific to Workflowland.
Fields§
§funcs: Vec<FunctionDef>
Lists all edge functions used in the Workflow.
tasks: Vec<TaskDef>
Lists all tasks used in the workflow.
classes: Vec<ClassDef>
Lists all classes used in the Workflow.
vars: Vec<VarDef>
Lists only toplevel / global variables used in the Workflow. Any in-function variables will be kept in the function itself.
results: HashMap<String, String>
Lists intermediate results defined in this workflow and maps them to where to find them (the name of the location).
Implementations§
source§impl SymTable
impl SymTable
sourcepub fn with(
funcs: Vec<FunctionDef>,
tasks: Vec<TaskDef>,
classes: Vec<ClassDef>,
vars: Vec<VarDef>,
results: HashMap<String, String>,
) -> Self
pub fn with( funcs: Vec<FunctionDef>, tasks: Vec<TaskDef>, classes: Vec<ClassDef>, vars: Vec<VarDef>, results: HashMap<String, String>, ) -> Self
Constructor for the SymTable that takes the given vectors instead.
§Arguments
funcs
: A vector ofFunctionDef
initions that defines all functions in the table.tasks
: A vector ofTaskDef
initions that defines all external functions in the table.classes
: A vector ofClassDef
initions that defines all classes in the table.vars
: A vector ofVarDef
initions that defines all variable in the table.results
: A map with the intermediate results (asString
,PathBuf
pairs).
§Returns
A new SymTable instance with the given definitions already added.
sourcepub fn func(&self, id: FunctionId) -> &FunctionDef
pub fn func(&self, id: FunctionId) -> &FunctionDef
Returns the function with the given index, if any.
§Arguments
id
: The ID/index of the function to get the compile state of.
§Returns
A reference to the corresponding FunctionDef
.
§Panics
This function may panic if id
is out-of-bounds.
Trait Implementations§
source§impl<'de> Deserialize<'de> for SymTable
impl<'de> Deserialize<'de> for SymTable
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl From<&TableState> for SymTable
impl From<&TableState> for SymTable
source§fn from(value: &TableState) -> Self
fn from(value: &TableState) -> Self
Converts to this type from the input type.
source§impl From<TableState> for SymTable
impl From<TableState> for SymTable
source§fn from(value: TableState) -> Self
fn from(value: TableState) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for SymTable
impl RefUnwindSafe for SymTable
impl Send for SymTable
impl Sync for SymTable
impl Unpin for SymTable
impl UnwindSafe for SymTable
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request