pub struct Assembly {
pub root: Node,
pub dependencies: EcoVec<(PathBuf, u64)>,
pub exports: Arc<IndexMap<Ident, usize>>,
pub functions: EcoVec<Node>,
pub index_macros: Arc<IndexMap<usize, IndexMacro>>,
pub code_macros: Arc<IndexMap<usize, CodeMacro>>,
pub bindings: EcoVec<BindingInfo>,
pub spans: EcoVec<Span>,
pub inputs: Inputs,
/* private fields */
}Expand description
A compiled Uiua assembly
Fields§
§root: NodeThe top-level node
dependencies: EcoVec<(PathBuf, u64)>A list of dependency paths and their hashes
exports: Arc<IndexMap<Ident, usize>>A list of top-level names
functions: EcoVec<Node>Functions
index_macros: Arc<IndexMap<usize, IndexMacro>>Unexpanded index macros
code_macros: Arc<IndexMap<usize, CodeMacro>>Unexpanded code macros
bindings: EcoVec<BindingInfo>A list of global bindings
spans: EcoVec<Span>Indexable list of spans
inputs: InputsInputs used to build the assembly
Implementations§
Source§impl Assembly
impl Assembly
Sourcepub fn add_function(
&mut self,
id: FunctionId,
sig: Signature,
root: Node,
origin: impl Into<FunctionOrigin>,
) -> Function
pub fn add_function( &mut self, id: FunctionId, sig: Signature, root: Node, origin: impl Into<FunctionOrigin>, ) -> Function
Add a function to the assembly
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Assembly
impl !RefUnwindSafe for Assembly
impl Send for Assembly
impl Sync for Assembly
impl Unpin for Assembly
impl !UnwindSafe for Assembly
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§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> 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>
Converts
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>
Converts
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