Internally, ValueBag includes a None variant, but there's no way to construct one. Typically in Rust you'd wrap a value in Option to express nullability, but since ValueBag itself is a container, it would be handy to have a way to distinguish between no value bag and a value bag with a None in it (in JavaScript for example the former is undefined, and the latter is null).
Internally,
ValueBag
includes aNone
variant, but there's no way to construct one. Typically in Rust you'd wrap a value inOption
to express nullability, but sinceValueBag
itself is a container, it would be handy to have a way to distinguish between no value bag and a value bag with aNone
in it (in JavaScript for example the former isundefined
, and the latter isnull
).