Struct StackFrame

Source
pub struct StackFrame<P, O> { /* private fields */ }
Expand description

Layer variables on top of the existing runtime

Implementations§

Source§

impl<P: Runtime, O: ObjectView> StackFrame<P, O>

Source

pub fn new(parent: P, data: O) -> Self

Layer variables on top of the existing runtime

Source

pub fn with_name<S: Into<KString>>(self, name: S) -> Self

Name the current context

Trait Implementations§

Source§

impl<P: Runtime, O: ObjectView> Runtime for StackFrame<P, O>

Source§

fn partials(&self) -> &dyn PartialStore

Partial templates for inclusion.
Source§

fn name(&self) -> Option<KStringRef<'_>>

The name of the currently active template.
Source§

fn roots(&self) -> BTreeSet<KStringCow<'_>>

All available values
Source§

fn try_get(&self, path: &[ScalarCow<'_>]) -> Option<ValueCow<'_>>

Recursively index into the stack.
Source§

fn get(&self, path: &[ScalarCow<'_>]) -> Result<ValueCow<'_>>

Recursively index into the stack.
Source§

fn set_global(&self, name: KString, val: Value) -> Option<Value>

Sets a value in the global runtime.
Source§

fn set_index(&self, name: KString, val: Value) -> Option<Value>

Used by increment and decrement tags
Source§

fn get_index<'a>(&'a self, name: &str) -> Option<ValueCow<'a>>

Used by increment and decrement tags
Source§

fn registers(&self) -> &Registers

Unnamed state for plugins during rendering

Auto Trait Implementations§

§

impl<P, O> Freeze for StackFrame<P, O>
where P: Freeze, O: Freeze,

§

impl<P, O> RefUnwindSafe for StackFrame<P, O>

§

impl<P, O> Send for StackFrame<P, O>
where P: Send, O: Send,

§

impl<P, O> Sync for StackFrame<P, O>
where P: Sync, O: Sync,

§

impl<P, O> Unpin for StackFrame<P, O>
where P: Unpin, O: Unpin,

§

impl<P, O> UnwindSafe for StackFrame<P, O>
where P: UnwindSafe, O: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> Any for T
where T: Any,