Function dilla_renderer::engine::remove
source · fn remove(
v: Value,
class: Option<&str>,
name: Option<&str>
) -> Result<Value, Error>
Expand description
Removes a class or attribute from a [minijinja::Value
].
Arguments
v
- The value object from which the class or attribute is to be removed.class
- An optional class name to be removed from the value object.name
- An optional attribute name to be removed from the value object.
Returns
A Result
containing either the modified value object or an Error
.
If the value object is not of map type, it is returned as is.
If the modification is successful, the modified value object is returned.