Skip to main content

Crate server_less_parse

Crate server_less_parse 

Source
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§

MethodInfo
Parsed method information with full syn AST types.
ParamInfo
Parsed parameter information
ParsedParamAttrs
Parsed result of #[param(...)] attributes.
PartitionedMethods
Categorized methods for code generation.
ReturnInfo
Parsed return type information

Enums§

ParamLocation
Parameter location for HTTP requests

Functions§

extract_docs
Extract doc comments from attributes
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> or BTreeMap<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.