Struct minijinja_stack_ref::Scope
source · pub struct Scope { /* private fields */ }Expand description
Implementations§
source§impl Scope
impl Scope
sourcepub fn handle<'env, T: 'env + ?Sized>(
&'env self,
value: &'env T
) -> StackHandle<T>
pub fn handle<'env, T: 'env + ?Sized>( &'env self, value: &'env T ) -> StackHandle<T>
Creates a StackHandle to a value with at least the scope’s lifetime.
sourcepub fn seq_object_ref<'env, T: SeqObject + 'static + ?Sized>(
&'env self,
value: &'env T
) -> Value
pub fn seq_object_ref<'env, T: SeqObject + 'static + ?Sized>( &'env self, value: &'env T ) -> Value
sourcepub fn struct_object_ref<'env, T: StructObject + 'static + ?Sized>(
&'env self,
value: &'env T
) -> Value
pub fn struct_object_ref<'env, T: StructObject + 'static + ?Sized>( &'env self, value: &'env T ) -> Value
Creates a Value from a borrowed StructObject.
This is equivalent to Value::from_struct_object(self.handle(value)).
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Scope
impl !Send for Scope
impl !Sync for Scope
impl Unpin for Scope
impl UnwindSafe for Scope
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