Skip to main content

layered_choice_expr

Function layered_choice_expr 

Source
fn layered_choice_expr(
    ty: &Type,
    leaf: ChoiceLeaf,
    sexp: &Ident,
    span: Span,
) -> TokenStream
Expand description

The decoding expression for a choice parameter of type ty whose value sits under Missing / Option / Either layers (#1473, #1551), applied to the SEXP binding sexp. Each layer is one miniextendr_api::match_arg_* helper that takes the decoder of the layers below it, so Missing<Option<Mode>> becomes

ⓘ
::miniextendr_api::match_arg_missing_or(sexp, ::miniextendr_api::match_arg_option_from_sexp::<Mode>)

Either<Route, DataFrame> becomes

ⓘ
::miniextendr_api::match_arg_either_or::<_, DataFrame, _>(sexp, ::miniextendr_api::match_arg_from_sexp::<Route>)

and a several_ok list with another kind of value (#1612), Either<Vec<Fill>, DataFrame>, becomes

ⓘ
::miniextendr_api::match_arg_either_or::<_, DataFrame, _>(sexp, ::miniextendr_api::match_arg_vec_from_sexp::<Fill>)