Skip to main content

impl_default_coercion_rule

Macro impl_default_coercion_rule 

Source
macro_rules! impl_default_coercion_rule {
    ($Type:ty, $Variant:path) => { ... };
    ($Type:ty, $Variant:path, $identity_roundtrip:expr) => { ... };
}
Expand description

Implements coercion by converting the selected PaxValue variant’s contents. The optional third argument opts into CoercionRules::is_identity_roundtrip; omit it unless the type satisfies that method’s exact, side-effect-free contract.