Module pax_value

Module pax_value 

Source

Modules§

functions
numeric

Enums§

PaxAny
This type serves a similar purpose as Box, but allows for special handling of some types, enabling things like coercion.
PaxValue
Container for all internal pax types Two important traits are related to this type: ToFromPaxValue - responsible for converting to and from specific types (u8, String, Color, etc) CoercionRules - responsible for coercing a PaxValue to a specific type (possibly from multiple different variants)

Traits§

CoercionRules
ImplToFromPaxAny
Marker trait. Implement only for types that are not part of PaxValue, but need to be stored inside a PaxAny. If they are part of pax value, instead implement CoercionRules manually, or using the default impl macro as seen in coercion_impls.rs
ToFromPaxAny
Trait that marks a type as being representable as a PaxAny, and provides the implementation for going to/from that type. For all builtins this means going to/from a pax value. For others to a Box. This is automatically Implemented for PaxValue types through the macro impl_to_from_pax_value!, and for other types by implementing the marker trait ImplToFromPaxAny.
ToPaxValue
This trait is implemented by all types that has a builtin equivalent representation (see to_from_impls module) This is NOT responsible for coercing between types, but returns an err in all cases where the underlying type is not exactly what is expected