MCPcopy Index your code

hub / github.com/JelteF/derive_more / functions

Functions1,002 in github.com/JelteF/derive_more

↓ 189 callersMethodmap
Maps the wrapped `item` with the provided `f`unction, preserving the current [`Span`].
impl/src/utils.rs:1462
↓ 86 callersMethodas_mut
(&mut self)
tests/as_mut.rs:22
↓ 85 callersMethodas_ref
(&self)
tests/as_ref.rs:21
↓ 81 callersMethodlen
(&self)
impl/src/utils.rs:2410
↓ 81 callersMethodspan
Returns the [`Span`] contained in this [`Spanning`] wrapper.
impl/src/utils.rs:1449
↓ 38 callersMethodinto_iter
(self)
tests/into_iterator.rs:86
↓ 37 callersMethodas_ref
Converts this `&`[`Spanning`]`<T>` into [`Spanning`]`<&T>` (moves the reference inside).
impl/src/utils.rs:1454
↓ 36 callersFunctionmap
Maps output of the parser in case it returned [`Some`].
impl/src/fmt/parsing.rs:565
↓ 24 callersFunctionchar
Checks whether `input` starts with `c`.
impl/src/fmt/parsing.rs:669
↓ 19 callersMethodnext
(&mut self)
impl/src/utils.rs:1377
↓ 18 callersMethodis_ident
(&self, ident: &I)
impl/src/utils.rs:1091
↓ 17 callersFunctionassert_iter
(iter: I, vals: &[T])
tests/into_iterator.rs:15
↓ 12 callersMethodcontains_type_structurally
(&self, needle: &Self)
impl/src/utils.rs:2893
↓ 10 callersFunctionalt
Returns first successful parser or [`None`] in case all of them returned [`None`].
impl/src/fmt/parsing.rs:558
↓ 10 callersMethodwrite_str
(&mut self, s: &str)
src/fmt.rs:177
↓ 9 callersFunctionadd_extra_where_clauses
( generics: &Generics, type_where_clauses: TokenStream, )
impl/src/utils.rs:221
↓ 9 callersFunctionpunct
Tries to parse a [`Punct`]. [`Punct`]: proc_macro2::Punct
impl/src/parsing.rs:118
↓ 8 callersMethodparse_args_with
(&self, parser: F)
impl/src/utils.rs:1145
↓ 7 callersMethodenabled_fields_data
(&'state self)
impl/src/utils.rs:607
↓ 7 callersMethodenabled_variant_data
( &'state self, )
impl/src/utils.rs:660
↓ 7 callersMethodget_ident
(&self)
impl/src/utils.rs:1101
↓ 7 callersMethodmatcher
( &self, indexes: &[usize], bindings: &[T], )
impl/src/utils.rs:799
↓ 7 callersFunctionoptional_result
Makes underlying `parser` optional by returning the original `input` and [`None`] in case it returned [`None`].
impl/src/fmt/parsing.rs:600
↓ 7 callersMethodtranspose
(self)
impl/src/utils.rs:1475
↓ 6 callersMethodadditional_deref_args
Returns an [`Iterator`] over the additional formatting arguments doing the dereferencing replacement in this [`FmtAttribute`] for those [`Placeholder`
impl/src/fmt/mod.rs:312
↓ 6 callersMethodany_in
Checks the provided [`syn::Type`] to contain anything from this [`GenericsSearch`].
impl/src/utils.rs:2549
↓ 6 callersMethodconvert_case
Converts the provided `name` into the case of this [`RenameAll`].
impl/src/utils.rs:2333
↓ 6 callersMethodident
Returns a [`syn::Ident`] in case this [`Expr`] is represented only by it. [`syn::Ident`]: struct@syn::Ident
impl/src/parsing.rs:28
↓ 6 callersMethodreplace_self_type
(&self)
impl/src/utils.rs:2718
↓ 5 callersMethodassert_single_enabled_field
( &'state self, )
impl/src/utils.rs:584
↓ 5 callersFunctioncheck_char
Checks whether first [`char`] suits `check`. [`char`]: fn@char
impl/src/fmt/parsing.rs:676
↓ 5 callersMethodcontains_generics
(&self, type_params: &[&syn::Ident])
impl/src/fmt/mod.rs:592
↓ 5 callersFunctionnamed_to_vec
(fields: &FieldsNamed)
impl/src/utils.rs:258
↓ 5 callersMethodnon_exhaustive_arm_pattern
( &self, prefix: &str, skipped_indices: &HashSet<usize>, )
impl/src/utils.rs:3066
↓ 5 callersFunctionunnamed_to_vec
(fields: &FieldsUnnamed)
impl/src/utils.rs:254
↓ 4 callersFunctionand_then
Returns [`None`] if the parser returned is [`None`], otherwise calls `f` with the wrapped value and returns the result.
impl/src/fmt/parsing.rs:583
↓ 4 callersMethodbounded_types
Returns an [`Iterator`] over bounded [`syn::Type`]s (and correspondent trait names) by this [`FmtAttribute`].
impl/src/fmt/mod.rs:229
↓ 4 callersFunctionformat
Parses a `format` as defined in the [grammar spec][0]. # Grammar [`format`]` := '{' [`[`argument`]`] [':' `[`format_spec`]`] '}'` # Example ```tex
impl/src/fmt/parsing.rs:252
↓ 4 callersFunctionnumbered_vars
(count: usize, prefix: &str)
impl/src/utils.rs:135
↓ 4 callersFunctionpanic_one_field
(trait_name: &str, trait_attr: &str)
impl/src/utils.rs:262
↓ 4 callersFunctionstr
Checks whether `input` starts with `s`.
impl/src/fmt/parsing.rs:664
↓ 3 callersFunctionadd_extra_ty_param_bound
( generics: &'a Generics, bound: &'a TokenStream, )
impl/src/utils.rs:176
↓ 3 callersFunctionassert
(input: &'a str, parsed: impl AsRef<[&'a str]>)
impl/src/fmt/mod.rs:729
↓ 3 callersFunctionbalanced_pair
Parses until balanced amount of `open` and `close` or eof. [`Cursor`] should be pointing **right after** the first `open`ing.
impl/src/parsing.rs:136
↓ 3 callersFunctionempty
()
tests/eq.rs:333
↓ 3 callersMethodexhaustive_arm_pattern
(&self, prefix: &str)
impl/src/utils.rs:3103
↓ 3 callersMethodexpand_fields
Expands fields initialization wrapped into [`token::Brace`]s in case of [`syn::FieldsNamed`], or [`token::Paren`] in case of [`syn::FieldsUnnamed`].
impl/src/from.rs:268
↓ 3 callersFunctionfailed_block
(state: &State, enum_name: &Ident, fn_name: &Ident)
impl/src/unwrap.rs:148
↓ 3 callersFunctionfailed_block
(state: &State, enum_name: &Ident, func_name: &Ident)
impl/src/try_unwrap.rs:153
↓ 3 callersFunctionget_meta_info
( trait_attr: &str, attrs: &[Attribute], allowed_attr_params: &[&str], )
impl/src/utils.rs:820
↓ 3 callersMethodget_option_inner
Returns the inner [`syn::Type`] if this one represents an [`Option`].
impl/src/error.rs:531
↓ 3 callersMethodinto_full
(self, defaults: FullMetaInfo)
impl/src/utils.rs:1238
↓ 3 callersMethodis_option
(&self)
impl/src/error.rs:537
↓ 3 callersMethodis_pretty
(&self)
src/fmt.rs:155
↓ 3 callersMethodis_ref
(self)
impl/src/utils.rs:121
↓ 3 callersFunctionis_type_path_ends_with_segment
Checks if `ty` is [`syn::Type::Path`] and ends with segment matching `tail` and doesn't contain any generic parameters.
impl/src/error.rs:356
↓ 3 callersMethodlifetime
(self)
impl/src/utils.rs:82
↓ 3 callersFunctionmap_or_else
Maps output of the parser in case it returned [`Some`] or uses `default`.
impl/src/fmt/parsing.rs:573
↓ 3 callersFunctionseq
Tries to execute the provided sequence of `parsers`.
impl/src/parsing.rs:164
↓ 3 callersFunctiontransmute
Nasty [`mem::transmute()`] that works in generic contexts by [`mem::forget`]ing stuff. It's OK for tests!
tests/into.rs:25
↓ 3 callersMethodtransparent_call_on_fields
Same as [`transparent_call()`], but additionally checks the returned [`Expr`] whether it's one of the [`fmt_args_idents`] of the provided [`syn::Field
impl/src/fmt/mod.rs:209
↓ 2 callersFunctionadd_extra_generic_param
( generics: &Generics, generic_param: TokenStream, )
impl/src/utils.rs:189
↓ 2 callersMethodadd_trait_path_type_param
(&mut self, param: TokenStream)
impl/src/utils.rs:580
↓ 2 callersFunctionadd_where_clauses_for_new_ident
( generics: &'a Generics, fields: &[&'a Field], type_ident: &Ident, type_where_clauses: TokenS
impl/src/utils.rs:235
↓ 2 callersMethodalias
Returns an `identifier` of the [named parameter][1]. [1]: https://doc.rust-lang.org/stable/std/fmt/index.html#named-parameters
impl/src/fmt/mod.rs:396
↓ 2 callersFunctionallowed_attr_params
()
impl/src/error.rs:175
↓ 2 callersFunctionassert_iter_contains_zero_or_one_item
( mut iter: impl Iterator<Item = (usize, &'a syn::Field, &'a MetaInfo)>, error_msg: &str, )
impl/src/error.rs:483
↓ 2 callersMethodbody
Generates body of the method implementation for this [`StructuralExpansion`].
impl/src/ops/mod.rs:57
↓ 2 callersMethodbody
Generates body of the [`PartialEq::eq()`]/[`PartialEq::ne()`] method implementation for this [`StructuralExpansion`], if it's required.
impl/src/cmp/partial_eq.rs:108
↓ 2 callersMethodcontains_arg
Checks whether this [`FmtAttribute`] contains an argument with the provided `name` (either in its direct [`FmtArgument`]s or inside [`Placeholder`]s).
impl/src/fmt/mod.rs:272
↓ 2 callersMethodenabled_infos
(&self)
impl/src/utils.rs:738
↓ 2 callersMethodexpand
Expands [`From`] implementations for a struct or an enum variant.
impl/src/from.rs:148
↓ 2 callersMethodfield_idents
(&self)
impl/src/utils.rs:701
↓ 2 callersMethodfmt_args_idents
(&self)
impl/src/fmt/mod.rs:715
↓ 2 callersMethodgenerate_body
Generates [`Display::fmt()`] implementation for a struct or an enum variant. # Errors In case [`FmtAttribute`] is [`None`] and [`syn::Fields`] lengt
impl/src/fmt/display.rs:405
↓ 2 callersMethodgenerate_body
Generates [`Debug::fmt()`] implementation for a struct or an enum variant. [`Debug::fmt()`]: std::fmt::Debug::fmt()
impl/src/fmt/debug.rs:253
↓ 2 callersMethodgenerate_bounds
Generates trait bounds for a struct or an enum variant.
impl/src/fmt/display.rs:500
↓ 2 callersMethodgenerate_bounds
Generates trait bounds for a struct or an enum variant.
impl/src/fmt/debug.rs:377
↓ 2 callersMethodget_inner_if
(&self, filter: impl Fn(&syn::Ident) -> bool)
impl/src/error.rs:541
↓ 2 callersMethodinto_inner
Destructures this [`Spanning`] wrapper returning the underlying `item`.
impl/src/utils.rs:1441
↓ 2 callersMethodis_trivial
Indicates whether this [`Type`] represents a trivial trait call without any modifications.
impl/src/fmt/parsing.rs:130
↓ 2 callersFunctionlookahead
Checks whether `parser` is successful while not advancing the original `input`.
impl/src/fmt/parsing.rs:592
↓ 2 callersMethodparse
(input: ParseStream<'_>)
impl/src/utils.rs:1073
↓ 2 callersMethodparse
(input: ParseStream<'_>)
impl/src/fmt/mod.rs:38
↓ 2 callersFunctionparse_field_impl
( is_valid_default_field_for_attr: &P, len: usize, iter: impl Iterator<Item = (usize, &'a syn::Fie
impl/src/error.rs:443
↓ 2 callersFunctionparse_fields
( type_params: &HashSet<syn::Ident>, state: &'state State<'input>, )
impl/src/error.rs:293
↓ 2 callersFunctionparse_fields_impl
( state: &'state State<'input>, is_valid_default_field_for_attr: P, )
impl/src/error.rs:399
↓ 2 callersMethodplaceholders_by_arg
Returns an [`Iterator`] over [`Placeholder`]s using an argument with the provided `name` (either in its direct [`FmtArgument`]s of this [`FmtAttribute
impl/src/fmt/mod.rs:280
↓ 2 callersMethodref_types
(&self)
impl/src/utils.rs:1251
↓ 2 callersMethodreference_with_lifetime
(self)
impl/src/utils.rs:112
↓ 2 callersFunctionrender_some
(mut expr: TokenStream, unpack: bool)
impl/src/error.rs:286
↓ 2 callersMethodself_constructor
Generates a `Self` type constructor with the provided `values` assigned to these [`syn::Fields`]. # Panics If number of provided `values` doesn't ma
impl/src/from_str.rs:356
↓ 2 callersMethodself_constructor_empty
Generates a `Self` type constructor with no fields. # Panics If these [`syn::Fields`] are not [empty]. [empty]: syn::Fields::is_empty
impl/src/from_str.rs:370
↓ 2 callersMethodshared_attr_info
Checks and indicates whether a top-level shared [`FmtAttribute`] is present in this [`Expansion`], and whether it has wrapping logic (e.g. uses `_vari
impl/src/fmt/display.rs:382
↓ 2 callersFunctionstruct_body
(return_type: &Ident, fields: &[&Field])
impl/src/constructor.rs:54
↓ 2 callersFunctiontake_while1
Parses while `parser` is successful. Returns [`None`] in case `parser` never succeeded.
impl/src/fmt/parsing.rs:623
↓ 2 callersMethodto_tokens
(&self, tokens: &mut TokenStream)
impl/src/utils.rs:1082
↓ 2 callersMethodtrait_name
Returns trait name of this [`Type`].
impl/src/fmt/parsing.rs:115
↓ 2 callersMethodtransparent_call
Checks whether this [`FmtAttribute`] can be replaced with a transparent delegation (calling a formatting trait directly instead of interpolation synta
impl/src/fmt/mod.rs:149
↓ 2 callersMethodvalidate_attrs
Validates attributes of this [`Expansion`] to be consistent.
impl/src/fmt/debug.rs:229
next →1–100 of 1,002, ranked by callers