Module easy_plugin::extractor []

Functions for extracting the values in AST entities.

Functions

attr_to_list

Returns the MetaItemKind::List values in the supplied Attribute.

attr_to_name_value

Returns the MetaItemKind::NameValue values in the supplied Attribute.

attr_to_word

Returns the MetaItemKind::Word value in the supplied Attribute.

expr_to_addr_of

Returns the ExprKind::AddrOf values in the supplied Expr.

expr_to_assign

Returns the ExprKind::Assign values in the supplied Expr.

expr_to_assign_op

Returns the ExprKind::AssignOp values in the supplied Expr.

expr_to_binary

Returns the ExprKind::Binary values in the supplied Expr.

expr_to_block

Returns the ExprKind::Block value in the supplied Expr.

expr_to_box

Returns the ExprKind::Box value in the supplied Expr.

expr_to_break

Returns the ExprKind::Break value in the supplied Expr.

expr_to_call

Returns the ExprKind::Call values in the supplied Expr.

expr_to_cast

Returns the ExprKind::Cast values in the supplied Expr.

expr_to_closure

Returns the ExprKind::Closure values in the supplied Expr.

expr_to_continue

Returns the ExprKind::Continue value in the supplied Expr.

expr_to_field

Returns the ExprKind::Field values in the supplied Expr.

expr_to_for_loop

Returns the ExprKind::ForLoop values in the supplied Expr.

expr_to_if

Returns the ExprKind::If values in the supplied Expr.

expr_to_if_let

Returns the ExprKind::IfLet values in the supplied Expr.

expr_to_in_place

Returns the ExprKind::InPlace values in the supplied Expr.

expr_to_index

Returns the ExprKind::Index values in the supplied Expr.

expr_to_inline_asm

Returns the ExprKind::InlineAsm value in the supplied Expr.

expr_to_lit

Returns the ExprKind::Lit value in the supplied Expr.

expr_to_loop

Returns the ExprKind::Loop values in the supplied Expr.

expr_to_mac

Returns the ExprKind::Mac value in the supplied Expr.

expr_to_match

Returns the ExprKind::Match values in the supplied Expr.

expr_to_method_call

Returns the ExprKind::MethodCall values in the supplied Expr.

expr_to_paren

Returns the ExprKind::Paren value in the supplied Expr.

expr_to_path

Returns the ExprKind::Path values in the supplied Expr.

expr_to_range

Returns the ExprKind::Range values in the supplied Expr.

expr_to_repeat

Returns the ExprKind::Repeat values in the supplied Expr.

expr_to_ret

Returns the ExprKind::Ret value in the supplied Expr.

expr_to_struct

Returns the ExprKind::Struct values in the supplied Expr.

expr_to_try

Returns the ExprKind::Try value in the supplied Expr.

expr_to_tup

Returns the ExprKind::Tup value in the supplied Expr.

expr_to_tup_field

Returns the ExprKind::TupField values in the supplied Expr.

expr_to_type

Returns the ExprKind::Type values in the supplied Expr.

expr_to_unary

Returns the ExprKind::Unary values in the supplied Expr.

expr_to_vec

Returns the ExprKind::Vec value in the supplied Expr.

expr_to_while

Returns the ExprKind::While values in the supplied Expr.

expr_to_while_let

Returns the ExprKind::WhileLet values in the supplied Expr.

item_to_const

Returns the ItemKind::Const values in the supplied Item.

item_to_default_impl

Returns the ItemKind::DefaultImpl values in the supplied Item.

item_to_enum

Returns the ItemKind::Enum values in the supplied Item.

item_to_extern_crate

Returns the ItemKind::ExternCrate value in the supplied Item.

item_to_fn

Returns the ItemKind::Fn values in the supplied Item.

item_to_foreign_mod

Returns the ItemKind::ForeignMod value in the supplied Item.

item_to_impl

Returns the ItemKind::Impl values in the supplied Item.

item_to_mac

Returns the ItemKind::Mac value in the supplied Item.

item_to_mod

Returns the ItemKind::Mod value in the supplied Item.

item_to_static

Returns the ItemKind::Static values in the supplied Item.

item_to_struct

Returns the ItemKind::Struct values in the supplied Item.

item_to_trait

Returns the ItemKind::Trait values in the supplied Item.

item_to_ty

Returns the ItemKind::Ty values in the supplied Item.

item_to_union

Returns the ItemKind::Union values in the supplied Item.

item_to_use

Returns the ItemKind::Use value in the supplied Item.

lit_to_bool

Returns the LitKind::Bool value in the supplied Lit.

lit_to_byte

Returns the LitKind::Byte value in the supplied Lit.

lit_to_byte_str

Returns the LitKind::ByteStr value in the supplied Lit.

lit_to_char

Returns the LitKind::Char value in the supplied Lit.

lit_to_float

Returns the LitKind::Float values in the supplied Lit.

lit_to_float_unsuffixed

Returns the LitKind::FloatUnsuffixed value in the supplied Lit.

lit_to_int

Returns the LitKind::Int values in the supplied Lit.

lit_to_str

Returns the LitKind::Str values in the supplied Lit.

meta_to_list

Returns the MetaItemKind::List values in the supplied MetaItem.

meta_to_name_value

Returns the MetaItemKind::NameValue values in the supplied MetaItem.

meta_to_word

Returns the MetaItemKind::Word value in the supplied MetaItem.

pat_to_box

Returns the PatKind::Box value in the supplied Pat.

pat_to_ident

Returns the PatKind::Ident values in the supplied Pat.

pat_to_lit

Returns the PatKind::Lit value in the supplied Pat.

pat_to_mac

Returns the PatKind::Mac value in the supplied Pat.

pat_to_path

Returns the PatKind::Path values in the supplied Pat.

pat_to_range

Returns the PatKind::Range values in the supplied Pat.

pat_to_ref

Returns the PatKind::Ref values in the supplied Pat.

pat_to_slice

Returns the PatKind::Slice values in the supplied Pat.

pat_to_struct

Returns the PatKind::Struct values in the supplied Pat.

pat_to_tuple

Returns the PatKind::Tuple values in the supplied Pat.

pat_to_tuple_struct

Returns the PatKind::TupleStruct values in the supplied Pat.

pat_to_wild

Returns Ok if the supplied Pat is Pat::Wild.

stmt_to_expr

Returns the StmtKind::Expr value in the supplied Stmt.

stmt_to_item

Returns the StmtKind::Item value in the supplied Stmt.

stmt_to_local

Returns the StmtKind::Local value in the supplied Stmt.

stmt_to_mac

Returns the StmtKind::Mac value in the supplied Stmt.

stmt_to_semi

Returns the StmtKind::Semi value in the supplied Stmt.

tok_to_and_and

Returns Ok if the supplied Spanned<Token> is Spanned<Token>::AndAnd.

tok_to_at

Returns Ok if the supplied Spanned<Token> is Spanned<Token>::At.

tok_to_bin_op

Returns the Token::BinOp value in the supplied Spanned<Token>.

tok_to_bin_op_eq

Returns the Token::BinOpEq value in the supplied Spanned<Token>.

tok_to_close_delim

Returns the Token::CloseDelim value in the supplied Spanned<Token>.

tok_to_colon

Returns Ok if the supplied Spanned<Token> is Spanned<Token>::Colon.

tok_to_comma

Returns Ok if the supplied Spanned<Token> is Spanned<Token>::Comma.

tok_to_comment

Returns Ok if the supplied Spanned<Token> is Spanned<Token>::Comment.

tok_to_doc_comment

Returns the Token::DocComment value in the supplied Spanned<Token>.

tok_to_dollar

Returns Ok if the supplied Spanned<Token> is Spanned<Token>::Dollar.

tok_to_dot

Returns Ok if the supplied Spanned<Token> is Spanned<Token>::Dot.

tok_to_dot_dot

Returns Ok if the supplied Spanned<Token> is Spanned<Token>::DotDot.

tok_to_dot_dot_dot

Returns Ok if the supplied Spanned<Token> is Spanned<Token>::DotDotDot.

tok_to_eof

Returns Ok if the supplied Spanned<Token> is Spanned<Token>::Eof.

tok_to_eq

Returns Ok if the supplied Spanned<Token> is Spanned<Token>::Eq.

tok_to_eq_eq

Returns Ok if the supplied Spanned<Token> is Spanned<Token>::EqEq.

tok_to_fat_arrow

Returns Ok if the supplied Spanned<Token> is Spanned<Token>::FatArrow.

tok_to_ge

Returns Ok if the supplied Spanned<Token> is Spanned<Token>::Ge.

tok_to_gt

Returns Ok if the supplied Spanned<Token> is Spanned<Token>::Gt.

tok_to_ident

Returns the Token::Ident value in the supplied Spanned<Token>.

tok_to_interpolated

Returns the Token::Interpolated value in the supplied Spanned<Token>.

tok_to_l_arrow

Returns Ok if the supplied Spanned<Token> is Spanned<Token>::LArrow.

tok_to_le

Returns Ok if the supplied Spanned<Token> is Spanned<Token>::Le.

tok_to_lifetime

Returns the Token::Lifetime value in the supplied Spanned<Token>.

tok_to_literal

Returns the Token::Literal values in the supplied Spanned<Token>.

tok_to_lt

Returns Ok if the supplied Spanned<Token> is Spanned<Token>::Lt.

tok_to_match_nt

Returns the Token::MatchNt values in the supplied Spanned<Token>.

tok_to_mod_sep

Returns Ok if the supplied Spanned<Token> is Spanned<Token>::ModSep.

tok_to_ne

Returns Ok if the supplied Spanned<Token> is Spanned<Token>::Ne.

tok_to_not

Returns Ok if the supplied Spanned<Token> is Spanned<Token>::Not.

tok_to_open_delim

Returns the Token::OpenDelim value in the supplied Spanned<Token>.

tok_to_or_or

Returns Ok if the supplied Spanned<Token> is Spanned<Token>::OrOr.

tok_to_pound

Returns Ok if the supplied Spanned<Token> is Spanned<Token>::Pound.

tok_to_question

Returns Ok if the supplied Spanned<Token> is Spanned<Token>::Question.

tok_to_r_arrow

Returns Ok if the supplied Spanned<Token> is Spanned<Token>::RArrow.

tok_to_semi

Returns Ok if the supplied Spanned<Token> is Spanned<Token>::Semi.

tok_to_shebang

Returns the Token::Shebang value in the supplied Spanned<Token>.

tok_to_special_var_nt

Returns the Token::SpecialVarNt value in the supplied Spanned<Token>.

tok_to_subst_nt

Returns the Token::SubstNt value in the supplied Spanned<Token>.

tok_to_tilde

Returns Ok if the supplied Spanned<Token> is Spanned<Token>::Tilde.

tok_to_underscore

Returns Ok if the supplied Spanned<Token> is Spanned<Token>::Underscore.

tok_to_whitespace

Returns Ok if the supplied Spanned<Token> is Spanned<Token>::Whitespace.

tt_to_delimited

Returns the TokenTree::Delimited value in the supplied TokenTree.

tt_to_sequence

Returns the TokenTree::Sequence value in the supplied TokenTree.

tt_to_token

Returns the TokenTree::Token value in the supplied TokenTree.

ty_to_array

Returns the TyKind::Array values in the supplied Ty.

ty_to_bare_fn

Returns the TyKind::BareFn value in the supplied Ty.

ty_to_impl_trait

Returns the TyKind::ImplTrait value in the supplied Ty.

ty_to_implicit_self

Returns Ok if the supplied Ty is Ty::ImplicitSelf.

ty_to_infer

Returns Ok if the supplied Ty is Ty::Infer.

ty_to_mac

Returns the TyKind::Mac value in the supplied Ty.

ty_to_never

Returns Ok if the supplied Ty is Ty::Never.

ty_to_object_sum

Returns the TyKind::ObjectSum values in the supplied Ty.

ty_to_paren

Returns the TyKind::Paren value in the supplied Ty.

ty_to_path

Returns the TyKind::Path values in the supplied Ty.

ty_to_poly_trait_ref

Returns the TyKind::PolyTraitRef value in the supplied Ty.

ty_to_ptr

Returns the TyKind::Ptr value in the supplied Ty.

ty_to_rptr

Returns the TyKind::Rptr values in the supplied Ty.

ty_to_slice

Returns the TyKind::Slice value in the supplied Ty.

ty_to_tup

Returns the TyKind::Tup value in the supplied Ty.

ty_to_typeof

Returns the TyKind::Typeof value in the supplied Ty.