pub struct Program {
pub functions: Vec<InlineFunction>,
pub declarations: Declarations,
/* private fields */
}
Fields§
§functions: Vec<InlineFunction>
§declarations: Declarations
Implementations§
Source§impl Program
impl Program
pub fn new(static_context: StaticContext, span: Span) -> Self
pub fn static_context(&self) -> &StaticContext
pub fn dynamic_context_builder(&self) -> DynamicContextBuilder<'_>
pub fn span(&self) -> Span
pub fn function_info<'a, 'b>( &'a self, function: &'b Function, ) -> FunctionInfo<'a, 'b>
Sourcepub fn runnable<'a>(
&'a self,
dynamic_context: &'a DynamicContext<'_>,
) -> Runnable<'a>
pub fn runnable<'a>( &'a self, dynamic_context: &'a DynamicContext<'_>, ) -> Runnable<'a>
Obtain a runnable version of this program, with a particular dynamic context.
pub fn add_function(&mut self, function: InlineFunction) -> InlineFunctionId
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Program
impl !RefUnwindSafe for Program
impl !Send for Program
impl !Sync for Program
impl Unpin for Program
impl UnwindSafe for Program
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> 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