Skip to main content

attempt_get_derive

Function attempt_get_derive 

Source
fn attempt_get_derive(attr: Attr, ident: SyntaxToken) -> WrapUnwrapOption
Expand description

Attempts to get the derive attribute from a derive attribute list

This will collect all the tokens in the “path” within the derive attribute list But a derive attribute list doesn’t have paths. So we need to collect all the tokens before and after the ident

If this functions return None just map to WrapAttr