pub struct CompilerTables {
pub connections: Vec<Connection>,
pub sources: BTreeMap<Route, (Source, usize)>,
pub destination_routes: BTreeMap<Route, (usize, usize, usize)>,
pub collapsed_connections: Vec<Connection>,
pub functions: Vec<FunctionDefinition>,
pub libs: BTreeSet<Url>,
pub context_functions: BTreeSet<Url>,
pub source_files: Vec<String>,
}
Expand description
CompilerTables are built from the flattened and connected flow model in memory and are used to generate the flow’s manifest ready to be executed.
Fields§
§connections: Vec<Connection>
The set of connections between functions in the compiled flow
sources: BTreeMap<Route, (Source, usize)>
Map of sources of values and what route they are connected to
destination_routes: BTreeMap<Route, (usize, usize, usize)>
Map from “route of the output of a function” –> (output name, source_function_id)
collapsed_connections: Vec<Connection>
HashMap from “route of the input of a function” –> (destination_function_id, input number, flow_id)
functions: Vec<FunctionDefinition>
The set of functions left in a flow after it has been flattened, connected and optimized
libs: BTreeSet<Url>
The set of libraries used by a flow, from their Urls
context_functions: BTreeSet<Url>
The set of context functions used by a flow, from their Urls
source_files: Vec<String>
The list of source files that were used in the flow definition
Implementations§
Source§impl CompilerTables
impl CompilerTables
Sourcepub fn connection_to(&self, input: &Route) -> Option<Connection>
pub fn connection_to(&self, input: &Route) -> Option<Connection>
Return an optional connection found to a destination input
Sourcepub fn sort_functions(&mut self)
pub fn sort_functions(&mut self)
consistently order the functions so each compile produces the same numbering
Sourcepub fn create_routes_table(&mut self)
pub fn create_routes_table(&mut self)
Construct two look-up tables that can be used to find the index of a function in the functions table, and the index of it’s input - using the input route or it’s output route
Trait Implementations§
Source§impl Default for CompilerTables
impl Default for CompilerTables
Source§fn default() -> CompilerTables
fn default() -> CompilerTables
Auto Trait Implementations§
impl Freeze for CompilerTables
impl RefUnwindSafe for CompilerTables
impl Send for CompilerTables
impl Sync for CompilerTables
impl Unpin for CompilerTables
impl UnwindSafe for CompilerTables
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<I, T> ExtractContext<I, ()> for T
impl<I, T> ExtractContext<I, ()> for T
Source§fn extract_context(self, _original_input: I)
fn extract_context(self, _original_input: I)
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