Skip to main content

expectation_const

Function expectation_const 

Source
fn expectation_const(inner: &Type) -> TokenStream
Expand description

The newtype’s TryFromSexp::__MX_EXPECTATION: what an argument of the inner type must be, in R terms, so a newtype parameter or Either arm reads as its inner type does (struct Dose(AsNumeric): a single number). The macro’s own wording when it knows the inner type (crate::r_preconditions::conversion_expectation), else the inner type’s constant, which a newtype of a newtype carries through.