Skip to main content

Module helpers

Module helpers 

Source
Expand description

Shared utility functions for lint rule implementations.

Structsยง

MiniextendrImplAttrs
Parsed miniextendr attribute information for an impl block.
SplitTopLevelCommas ๐Ÿ”’

Traitsยง

MetaToString ๐Ÿ”’
Helper trait for converting Meta to a normalized string.

Functionsยง

extract_cfg_attrs
Extract #[cfg(...)] attributes as normalized token strings.
extract_path_attr
Extract #[path = "..."] attribute value from a module declaration.
extract_roxygen_tags
Extract roxygen tags from doc-comment attributes.
has_altrep_derive
Returns true if the attribute list contains #[derive(Altrep)] or #[derive(miniextendr_api::Altrep)].
has_external_ptr_derive
Returns true if the attribute list contains #[derive(ExternalPtr)] or #[derive(miniextendr_api::ExternalPtr)].
has_miniextendr_attr
Returns true when the attribute list contains #[miniextendr].
has_vctrs_derive
Returns true if the attribute list contains #[derive(Vctrs)] or #[derive(miniextendr_api::Vctrs)].
impl_type_name
Extracts a displayable type name from an impl self type.
is_altrep_struct
Check if a struct with #[miniextendr] should be treated as ALTREP (needing struct Name; in module).
parse_miniextendr_impl_attrs
Parse the #[miniextendr(โ€ฆ)] attribute to extract class system, label, and flags.
should_skip_dir
Returns whether a directory should be skipped during lint tree traversal.
split_top_level_commas ๐Ÿ”’
Split a token string on top-level commas (ignoring commas inside (...) groups).