pub enum ArgValue<'h> {
Show 21 variants
Nil,
Bool(bool),
Int(i64),
BigInt(GenericValue),
Float(f64),
Rational(GenericValue),
Str(&'h str),
List(GenericValue),
Tuple(GenericValue),
Dict(GenericValue),
Set(GenericValue),
Range(GenericValue),
StopIteration,
Instance(GenericValue),
Class(GenericValue),
Function(GenericValue),
Module(GenericValue),
Exception(GenericValue),
Generator(GenericValue),
Iterator(GenericValue),
Other(GenericValue),
}Expand description
A decoded view of a GenericValue, obtained via Host::decode.
Variants§
Nil
The nil value.
Bool(bool)
A boolean.
Int(i64)
An integer that fits in an i64.
BigInt(GenericValue)
An integer that does not fit in an i64; convert via
Host::display if a textual form suffices.
Float(f64)
A float.
Rational(GenericValue)
A rational number; inspect via Host::display.
Str(&'h str)
A string, borrowed from the host (see the re-fetch rule).
List(GenericValue)
A list (Host::list_len, Host::list_get).
Tuple(GenericValue)
A tuple (Host::tuple_len, Host::tuple_get).
Dict(GenericValue)
A dict (Host::dict_get, Host::dict_set).
Set(GenericValue)
A set (Host::set_add, Host::set_contains).
Range(GenericValue)
A range; inspect via Host::display or drive its iterator.
StopIteration
The exhausted-iterator sentinel.
Instance(GenericValue)
A plain class instance (Host::attr_get, Host::invoke).
Class(GenericValue)
A class (Host::call instantiates).
Function(GenericValue)
A callable (Host::call).
Module(GenericValue)
A module.
Exception(GenericValue)
An exception instance.
Generator(GenericValue)
A generator; drive via Host::invoke with __next__.
Iterator(GenericValue)
An iterator (drive via Host::invoke with __next__).
Other(GenericValue)
VM-internal values a plugin should never meaningfully receive.