MCPcopy Create free account
hub / github.com/Wulf/tsync / has_attribute_arg

Function has_attribute_arg

src/utils.rs:129–131  ·  view source on GitHub ↗

Check has an attribute arg.

(needle: &str, arg: &str, attributes: &[syn::Attribute])

Source from the content-addressed store, hash-verified

127
128/// Check has an attribute arg.
129pub fn has_attribute_arg(needle: &str, arg: &str, attributes: &[syn::Attribute]) -> bool {
130 get_attribute_arg(needle, arg, attributes).is_some()
131}
132
133/// Checks if a [`proc_macro2::TokenTree`] is a literal character ('a'), string ("hello"),
134/// number (2.3), etc. If so, trim it to retain only the comment body, returning `Some(comment)`,

Callers 1

convert_to_tsMethod · 0.85

Calls 1

get_attribute_argFunction · 0.85

Tested by

no test coverage detected