Skip to main content

expand_deriving_from

Function expand_deriving_from 

Source
pub(crate) fn expand_deriving_from(
    cx: &ExtCtxt<'_>,
    span: Span,
    item: &Item,
    push: &mut dyn FnMut(Box<Item>),
    is_const: bool,
)
Expand description

Generate an implementation of the From trait, provided that item is a struct or a tuple struct with exactly one field.