Skip to main content

assign_value

Function assign_value 

Source
pub fn assign_value<T: Into<Stored>, S: Into<Option<Scope>>>(
    key: &str,
    value: T,
    scope: S,
)
Expand description

Bind key to value in the value table — Perl’s AssignValue.

Scope decides how long the binding lasts: Scope::Local expires with the enclosing TeX group, Scope::Global does not, Scope::Named applies only while that scope is activated, and Scope::InPlace rebinds at the frame the value was last bound in. Passing None takes the state’s current default. Read back with lookup_value, or one of the typed lookup_string / lookup_number / lookup_bool accessors.