pub struct GlobalCtx<'a> {
pub types: &'a UniqueArena<Type>,
pub constants: &'a Arena<Constant>,
pub overrides: &'a Arena<Override>,
pub global_expressions: &'a Arena<Expression>,
}
Fields§
§types: &'a UniqueArena<Type>
§constants: &'a Arena<Constant>
§overrides: &'a Arena<Override>
§global_expressions: &'a Arena<Expression>
Implementations§
source§impl GlobalCtx<'_>
impl GlobalCtx<'_>
sourcepub(crate) fn eval_expr_to_u32(
&self,
handle: Handle<Expression>,
) -> Result<u32, U32EvalError>
pub(crate) fn eval_expr_to_u32( &self, handle: Handle<Expression>, ) -> Result<u32, U32EvalError>
Try to evaluate the expression in self.global_expressions
using its handle
and return it as a u32
.
sourcepub(crate) fn eval_expr_to_u32_from(
&self,
handle: Handle<Expression>,
arena: &Arena<Expression>,
) -> Result<u32, U32EvalError>
pub(crate) fn eval_expr_to_u32_from( &self, handle: Handle<Expression>, arena: &Arena<Expression>, ) -> Result<u32, U32EvalError>
Try to evaluate the expression in the arena
using its handle
and return it as a u32
.
sourcepub(crate) fn eval_expr_to_bool_from(
&self,
handle: Handle<Expression>,
arena: &Arena<Expression>,
) -> Option<bool>
pub(crate) fn eval_expr_to_bool_from( &self, handle: Handle<Expression>, arena: &Arena<Expression>, ) -> Option<bool>
Try to evaluate the expression in the arena
using its handle
and return it as a bool
.
pub(crate) fn eval_expr_to_literal( &self, handle: Handle<Expression>, ) -> Option<Literal>
fn eval_expr_to_literal_from( &self, handle: Handle<Expression>, arena: &Arena<Expression>, ) -> Option<Literal>
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for GlobalCtx<'a>
impl<'a> RefUnwindSafe for GlobalCtx<'a>
impl<'a> Send for GlobalCtx<'a>
impl<'a> Sync for GlobalCtx<'a>
impl<'a> Unpin for GlobalCtx<'a>
impl<'a> UnwindSafe for GlobalCtx<'a>
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
)