MCPcopy Create free account

hub / github.com/PoignardAzur/venial / functions

Functions215 in github.com/PoignardAzur/venial

↓ 66 callersFunctionparse_declaration_checked
(tokens: TokenStream)
src/tests.rs:19
↓ 35 callersFunctionparse_item
Parses the token stream of an item declaration. For instance, if you're implementing a derive macro, you can pass the token stream as-is. ## Panics
src/parse.rs:59
↓ 16 callersFunctionconsume_ident
(tokens: &mut TokenIter, expected: &str)
src/parse_utils.rs:46
↓ 16 callersMethodpush
Add an items at the end of the list. If `comma` is None, sets `self.skip_last` to true, and adds a comma to the array with default values. That comma
src/punctuated.rs:29
↓ 13 callersFunctionconsume_stuff_until
Consumes tokens until a separator is reached *unless* the separator in between angle brackets eg consume_stuff_until(..., |token| token == ',') will c
src/parse_utils.rs:218
↓ 12 callersFunctionparse_struct_declaration
(tokens: TokenStream)
src/tests.rs:961
↓ 11 callersMethodquote_with
(&self, tokens: &mut TokenStream, f: impl FnOnce(&mut TokenStream))
src/types.rs:1078
↓ 10 callersFunctionparse_any_ident
(tokens: &mut TokenIter, panic_context: &str)
src/parse_utils.rs:13
↓ 9 callersFunctionconsume_punct
(tokens: &mut TokenIter, expected: char)
src/parse_utils.rs:68
↓ 9 callersFunctionparse_punct
(tokens: &mut TokenIter, expected: char, panic_context: &str)
src/parse_utils.rs:57
↓ 9 callersMethodwith_param
Builder method, add a [`GenericParam`]. Add lifetime params to the beginning of the list.
src/types_edition.rs:559
↓ 8 callersFunctionconsume_comma
(tokens: &mut TokenIter)
src/parse_utils.rs:275
↓ 8 callersMethodlen
Return number of items.
src/punctuated.rs:69
↓ 7 callersFunctionconsume_where_clause
(tokens: &mut TokenIter)
src/parse_type.rs:215
↓ 6 callersFunctionconsume_generic_params
(tokens: &mut TokenIter)
src/parse_type.rs:44
↓ 6 callersFunctionconsume_outer_attributes
Outer macro attributes of the form `#[attribute]` Panics if any inner attributes such as `#![attribute]` are encountered.
src/parse_utils.rs:176
↓ 6 callersFunctionparse_ident
(tokens: &mut TokenIter, expected: &str, panic_context: &str)
src/parse_utils.rs:24
↓ 5 callersFunctionconsume_item_name
(tokens: &mut TokenIter)
src/parse_type.rs:16
↓ 5 callersFunctionconsume_vis_marker
(tokens: &mut TokenIter)
src/parse_utils.rs:187
↓ 5 callersMethodis_empty
Return true if collection has no items.
src/punctuated.rs:74
↓ 5 callersMethoditems
Return an interator that reads items.
src/punctuated.rs:53
↓ 4 callersMethodas_path
Tries to parse this type as a [`Path`] such as `path::to::Type<'a, other::Type>`. If it does not match a path, `None` is returned.
src/types_edition.rs:802
↓ 4 callersMethodspan
Returns a span in the first error. Note that, if span merging isn't enabled (currently nightly-only), the returned span will the smalled than the spa
src/error.rs:112
↓ 3 callersFunctionconsume_bound
( tokens: &mut TokenIter, mut end_predicate: impl FnMut(&TokenTree) -> bool, )
src/parse_type.rs:20
↓ 3 callersFunctionconsume_colon2
Parse `::`, as in path separator or turbofish. Does not advance `tokens` if the double colon is not found.
src/parse_utils.rs:282
↓ 3 callersFunctionconsume_field_type
(tokens: &mut TokenIter)
src/parse_type.rs:280
↓ 3 callersFunctionformat_debug_tokens
( f: &mut std::fmt::Formatter<'_>, tokens: &[TokenTree], )
src/types.rs:868
↓ 3 callersFunctionparse_const_or_static
( tokens: &mut TokenIter, attributes: Vec<Attribute>, vis_marker: Option<VisMarker>, )
src/parse_impl.rs:19
↓ 3 callersFunctionparse_impl_body
( token_group: Group, allow_static: bool, )
src/parse_impl.rs:188
↓ 3 callersFunctionparse_named_fields
(token_group: Group)
src/parse_type.rs:358
↓ 2 callersFunctionconsume_any_ident
(tokens: &mut TokenIter)
src/parse_utils.rs:35
↓ 2 callersFunctionconsume_attributes_with_inner
Parse zero, one or more attributes. If `expect_inner` is true, then this will only parse inner attributes `#![...]` and stop *before* any outer attri
src/parse_utils.rs:85
↓ 2 callersFunctionconsume_either_fn_type_const_static_impl
TODO could accept a mask, allowing only certain sub-items. This could be made to reject e.g. extern crate in impl blocks.
src/parse_impl.rs:122
↓ 2 callersFunctionconsume_generic_args
(tokens: &mut TokenIter)
src/parse_type.rs:170
↓ 2 callersFunctionconsume_inner_attributes
Inner macro attributes of the form `#![attribute]`. Stops _before_ encountering any outer attributes such as `#[attribute]`.
src/parse_utils.rs:183
↓ 2 callersFunctionconsume_item
Consume an item declaration from a token stream. This is the same as [parse_item], except it doesn't panic if there are leftover tokens. ## Panics
src/parse.rs:86
↓ 2 callersFunctionconsume_lifetime
( tokens: &mut Peekable<impl Iterator<Item = TokenTree>>, expect_end: bool, )
src/parse_type.rs:129
↓ 2 callersFunctionconsume_macro
(tokens: &mut TokenIter, attributes: Vec<Attribute>)
src/parse_fn.rs:259
↓ 2 callersMethodis_lifetime
Returns true if the generic param is a lifetime param.
src/types_edition.rs:668
↓ 2 callersFunctionparse_generic_args_checked
(tokens: TokenStream)
src/tests.rs:28
↓ 2 callersFunctionparse_impl
(tokens: &mut TokenIter, attributes: Vec<Attribute>)
src/parse_impl.rs:229
↓ 2 callersFunctionparse_mod
( tokens: &mut Peekable<IntoIter>, attributes: Vec<Attribute>, vis_marker: Option<VisMarker>, )
src/parse_mod.rs:12
↓ 2 callersFunctionparse_trait
( tokens: &mut TokenIter, attributes: Vec<Attribute>, vis_marker: Option<VisMarker>, )
src/parse_impl.rs:296
↓ 2 callersFunctionparse_tuple_fields
(token_group: Group)
src/parse_type.rs:326
↓ 2 callersFunctiontokens_from_slice
(slice: &[TokenTree])
src/parse_utils.rs:8
↓ 1 callersMethodas_inline_args
See [`InlineGenericArgs`] for details.
src/types_edition.rs:569
↓ 1 callersFunctionconsume_enum_discriminant
( tokens: &mut TokenIter, )
src/parse_type.rs:299
↓ 1 callersFunctionconsume_extern_block
( tokens: &mut TokenIter, attributes: Vec<Attribute>, vis_marker: Option<VisMarker>, )
src/parse_extern.rs:62
↓ 1 callersFunctionconsume_extern_crate
( tokens: &mut TokenIter, attributes: Vec<Attribute>, vis_marker: Option<VisMarker>, )
src/parse_extern.rs:14
↓ 1 callersFunctionconsume_fn
Tries to parse a function definition. Panics when the following tokens do not constitute a function definition, with one exception: when `const` is f
src/parse_fn.rs:148
↓ 1 callersFunctionconsume_fn_qualifiers
(tokens: &mut TokenIter)
src/parse_fn.rs:33
↓ 1 callersFunctionconsume_fn_return
(tokens: &mut TokenIter)
src/parse_fn.rs:118
↓ 1 callersFunctionconsume_macro_inner
(tokens: &mut TokenIter, attributes: Vec<Attribute>)
src/parse_fn.rs:273
↓ 1 callersFunctionconsume_path
Tries to parse a path expressions; returns `None` if not matching.
src/parse_utils.rs:301
↓ 1 callersFunctionconsume_ty_definition
( tokens: &mut TokenIter, attributes: Vec<Attribute>, vis_marker: Option<VisMarker>, )
src/parse_impl.rs:78
↓ 1 callersMethodgeneric_params
Returns the [`GenericParamList`], if any, of the declaration. For instance, this will return Some for `struct MyStruct<A, B, C> { ... }`, Some for `i
src/types_edition.rs:63
↓ 1 callersMethodhas_only_const_xor_unsafe
Whether exactly either `const` or `unsafe` attribute is set, and no other one (so the tokens could be the start of a constant or impl declaration)
src/types_edition.rs:546
↓ 1 callersMethodinsert
Inserts an element at position `index`. # Panics Panics if `index` is greater than the number of elements previously in this punctuated sequence.
src/punctuated.rs:41
↓ 1 callersMethodis_empty_variant
Returns true if the variant doesn't store a type.
src/types_edition.rs:527
↓ 1 callersFunctionparse_enum_variants
(tokens: TokenStream)
src/parse_type.rs:394
↓ 1 callersFunctionparse_extern_block
( tokens: &mut TokenIter, attributes: Vec<Attribute>, vis_marker: Option<VisMarker>, )
src/parse_extern.rs:54
↓ 1 callersFunctionparse_extern_crate
( tokens: &mut TokenIter, attributes: Vec<Attribute>, vis_marker: Option<VisMarker>, )
src/parse_extern.rs:6
↓ 1 callersFunctionparse_fn_params
(tokens: TokenStream)
src/parse_fn.rs:72
↓ 1 callersFunctionparse_generic_arg
(tokens: Vec<TokenTree>)
src/parse_type.rs:95
↓ 1 callersFunctionparse_use_declaration
( tokens: &mut TokenIter, attributes: Vec<Attribute>, vis_marker: Option<VisMarker>, )
src/parse_mod.rs:68
↓ 1 callersMethodspan
Returns span of this item.
src/types_edition.rs:858
↓ 1 callersMethodto_owned_args
Returns an owned argument list from this. # Panics If `self` is a mal-formed generic argument list.
src/types_edition.rs:694
↓ 1 callersMethodunwrap_invisible_group
If the type has a top-level `Group` token without separator, extract the contents. Otherwise return `None`.
src/types_edition.rs:813
↓ 1 callersMethodwith_predicate
Builder method, add a predicate to the where-clause.
src/types_edition.rs:751
Method__no_split_for_impl__
()
src/types_edition.rs:263
Functionadd_bounded_lifetime
()
src/tests.rs:1014
Functionadd_bounded_ty_param
()
src/tests.rs:1053
Functionadd_const_param
()
src/tests.rs:1070
Functionadd_lifetime
()
src/tests.rs:984
Functionadd_ty_param
()
src/tests.rs:1031
Functionadd_where_item
()
src/tests.rs:1098
Methodas_constant
Returns the [`Constant`] variant of the enum if possible.
src/types_edition.rs:203
Methodas_enum
Returns the [`Enum`] variant of the enum if possible.
src/types_edition.rs:147
Methodas_extern_block
Returns the [`ExternBlock`] variant of the enum if possible.
src/types_edition.rs:227
Methodas_extern_crate
Returns the [`ExternCrate`] variant of the enum if possible.
src/types_edition.rs:235
Methodas_function
Returns the [`Function`] variant of the enum if possible.
src/types_edition.rs:195
Methodas_impl
Returns the [`Impl`] variant of the enum if possible.
src/types_edition.rs:179
Methodas_macro
Returns the [`Macro`] variant of the enum if possible.
src/types_edition.rs:219
Methodas_module
Returns the [`Module`] variant of the enum if possible.
src/types_edition.rs:163
Methodas_struct
Returns the [`Struct`] variant of the enum if possible.
src/types_edition.rs:139
Methodas_trait
Returns the [`Trait`] variant of the enum if possible.
src/types_edition.rs:171
Methodas_type_alias
Returns the [`TypeAlias`] variant of the enum if possible.
src/types_edition.rs:187
Methodas_union
Returns the [`Union`] variant of the enum if possible.
src/types_edition.rs:155
Methodas_use_declaration
Returns the [`UseDeclaration`] variant of the enum if possible.
src/types_edition.rs:211
Methodattributes
Returns the [`Vec<Attribute>`] of the declaration. This method is provided for convenience, but it's more idiomatic to match on Declaration and use t
src/types_edition.rs:16
Methodattributes_mut
Returns the [`Vec<Attribute>`] of the declaration. This method is provided for convenience, but it's more idiomatic to match on Declaration and use t
src/types_edition.rs:37
Methodbounded_lifetime
Create new lifetime param from name and bound. ``` # use venial::GenericParam; # use quote::quote; GenericParam::bounded_lifetime("a", quote!(b + c).
src/types_edition.rs:599
Methodbounded_ty
Create new type param from name and bound. ``` # use venial::GenericParam; # use quote::quote; GenericParam::bounded_ty("T", quote!(Debug + Eq).into_
src/types_edition.rs:635
Methodcombine
Add another error message to self such that when `to_compile_error()` is called, both errors will be emitted together.
src/error.rs:130
Methodconst_param
Create new const param from name and type. ``` # use venial::GenericParam; # use quote::quote; GenericParam::const_param("N", quote!(i32).into_iter()
src/types_edition.rs:655
Methoddefault
()
src/types.rs:1671
Methoddefault
()
src/punctuated.rs:82
Methodderef
(&self)
src/punctuated.rs:117
Methodderef_mut
(&mut self)
src/punctuated.rs:123
Methodfield_names
Returns a collection of strings that can be used to exhaustively access the struct's fields. If the struct is a tuple struct, integer strings will be
src/types_edition.rs:298
next →1–100 of 215, ranked by callers