Skip to main content

Module helpers

Module helpers 

Source
Expand description

Shared utility functions for lint rule implementations.

Re-exportsยง

use std::path::Path; ๐Ÿ”’
use syn::Attribute; ๐Ÿ”’

Structsยง

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

Constantsยง

CLASS_SYSTEMS ๐Ÿ”’
The class-system identifiers an impl-level #[miniextendr(...)] names.

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_derive
Returns true if the attribute list contains #[derive(name)] or #[derive(miniextendr_api::name)] for the given derive name (e.g. "ExternalPtr", "Altrep", "Vctrs").
has_miniextendr_attr
Returns true when the attribute list contains #[miniextendr].
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 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).