pub struct StackHandle<T: ?Sized> { /* private fields */ }
Expand description

A handle to an enclosed value.

For as long as the Scope is still valid access to the reference can be temporarily fetched via the with method. Doing so after the scope is gone, this will panic on all operations.

To check if a handle is still valid is_valid can be used.

A stack handle implements the underlying object protocols from MiniJinja.

Implementations§

Checks if the handle is still valid.

Invokes a function with the resolved reference.

Panics

This method panics if the handle is not valid.

Trait Implementations§

Formats the value using the given formatter. Read more
Formats the value using the given formatter. Read more
Describes the kind of an object. Read more
Called when the engine tries to call a method on the object. Read more
Called when the object is invoked directly. Read more
Looks up an item by index. Read more
Returns the number of items in the sequence.
Invoked by the engine to get a field of a struct. Read more
If possible returns a static vector of field names. Read more
Returns a vector of field names. Read more
Returns the number of fields. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

Converts the given value to a String. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.