Expand description
Shared parsing utilities for server-less proc macros.
This crate provides common types and functions for extracting method information from impl blocks.
Structs§
- Group
Registry - Registry of declared method groups from
#[server(groups(...))]. - Method
Info - Parsed method information with full
synAST types. - Param
Info - Parsed parameter information
- Parsed
Param Attrs - Parsed result of
#[param(...)]attributes. - Partitioned
Methods - Categorized methods for code generation.
- Return
Info - Parsed return type information
Enums§
- Param
Location - Parameter location for HTTP requests
Functions§
- extract_
docs - Extract doc comments from attributes
- extract_
groups - Extract the group registry from
#[server(groups(...))]on an impl block. - extract_
iterator_ item - Check if a type is impl Iterator<Item=T> and extract T
- extract_
map_ type - Check if a type is
HashMap<K, V>orBTreeMap<K, V>and extract K and V - extract_
methods - Extract all methods from an impl block
- extract_
option_ type - Check if a type is
Option<T>and extract T - extract_
result_ types - Check if a type is Result<T, E> and extract T and E
- extract_
stream_ item - Check if a type is impl Stream<Item=T> and extract T
- extract_
vec_ type - Check if a type is
Vec<T>and extract T - get_
impl_ name - Get the struct name from an impl block
- is_
bool_ type - Check if a type is
bool - is_
id_ param - Check if a parameter name looks like an ID
- is_
option_ type - Check if a type is
Option<T> - is_
unit_ type - Check if a type is ()
- parse_
param_ attrs - Parse #[param(…)] attributes from a parameter
- parse_
params - Parse function parameters (excluding self)
- parse_
return_ type - Parse return type information
- partition_
methods - Partition methods into leaf commands, static mounts, and slug mounts.
- resolve_
method_ group - Resolve a method’s group against the registry.