Struct liquid_core::runtime::GlobalFrame
source · pub struct GlobalFrame<P> { /* private fields */ }Expand description
A stack frame that only provides a sandboxed set of globals
Implementations§
Trait Implementations§
source§impl<P: Runtime> Runtime for GlobalFrame<P>
impl<P: Runtime> Runtime for GlobalFrame<P>
source§fn partials(&self) -> &dyn PartialStore
fn partials(&self) -> &dyn PartialStore
Partial templates for inclusion.
source§fn name(&self) -> Option<KStringRef<'_>>
fn name(&self) -> Option<KStringRef<'_>>
The name of the currently active template.
source§fn roots(&self) -> BTreeSet<KStringCow<'_>>
fn roots(&self) -> BTreeSet<KStringCow<'_>>
All available values
source§fn try_get(&self, path: &[ScalarCow<'_>]) -> Option<ValueCow<'_>>
fn try_get(&self, path: &[ScalarCow<'_>]) -> Option<ValueCow<'_>>
Recursively index into the stack.
source§fn get(&self, path: &[ScalarCow<'_>]) -> Result<ValueCow<'_>>
fn get(&self, path: &[ScalarCow<'_>]) -> Result<ValueCow<'_>>
Recursively index into the stack.
source§fn set_global(&self, name: KString, val: Value) -> Option<Value>
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>
fn set_index(&self, name: KString, val: Value) -> Option<Value>
Used by increment and decrement tags
Auto Trait Implementations§
impl<P> !Freeze for GlobalFrame<P>
impl<P> !RefUnwindSafe for GlobalFrame<P>
impl<P> Send for GlobalFrame<P>where
P: Send,
impl<P> !Sync for GlobalFrame<P>
impl<P> Unpin for GlobalFrame<P>where
P: Unpin,
impl<P> UnwindSafe for GlobalFrame<P>where
P: UnwindSafe,
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