Module exposed

Source
Expand description

Exposed namespace of the module.

Modules§

attr
Attributes analyzys and manipulation.
attr_prop
Attribute’s properties. Reuse them to define how to parse properties of an attribute.
collection
Function and structures to work with collections. Module containing all collection macros
components
Type-based assigning.
container_kind
Determine kind of a container.
ct
Compile-time tools.
derive
Macro helpers around derive macro and structure syn::DeriveInput.
diag
Macro helpers.
equation
Attributes analyzys and manipulation.
error
Errors handling. Alias for std::error::BasicError.
generic_args
This module provides utilities to handle and manipulate generic arguments using the syn crate. It includes traits and functions for transforming, merging, and managing generic parameters within procedural macros, enabling seamless syntactic analysis and code generation.
generic_params
Functions and structures to handle and manipulate generic parameters using the syn crate. It’s designed to support macro-driven code generation by simplifying, merging, extracting, and decomposing syn::Generics.
ident
Utilities for manipulating identifiers, including keyword handling.
item
This module provides various utilities and namespaces for working with syn::Item, specifically focusing on ensuring syntactical correctness and managing different visibility levels within the code. It includes functions to manipulate the structure of items, handle different kinds of fields, and provide a structured approach to organizing the codebase into different access levels.
item_struct
Parse structures, like struct { a : i32 }.
kw
Keywords
name
Tait to getn name of an Item.
phantom
Responsible for generating marker PhantomData fields to avoid the rule requiring the usage of all generic parameters in a struct. This is often necessary to ensure that Rust’s type system correctly tracks the ownership and lifetimes of these parameters without needing them to be explicitly used in the struct’s fields.
proc_macro2
githubcrates-iodocs-rs
punctuated
Structures and functions for handling syn::punctuated::Punctuated collections.
quantifier
Quantifiers like Pair and Many.
quote
githubcrates-iodocs-rs
struct_like
Parse structures, like struct { a : i32 }.
syn
githubcrates-iodocs-rs
thiserror
Errors handling. githubcrates-iodocs-rs
tokens
Attributes analyzys and manipulation.
typ
Advanced syntax elements.
typed
Typed parsing.

Macros§

Token
A type-macro that expands to the name of the Rust type representation of a given token.
bmap
Function and structures to work with collections. Creates a BTreeMap from a list of key-value pairs.
braced
Parse a set of curly braces and expose their content to subsequent parsers.
bracketed
Parse a set of square brackets and expose their content to subsequent parsers.
bset
Function and structures to work with collections. Creates a BTreeSet from a list of elements.
code_diagnostics_str
Macro for diagnostics purpose to diagnose source code behind it and export it into a string.
code_print
Macro for diagnostics purpose to print both syntax tree and source code behind it without syntax tree.
code_to_str
Macro to export source code behind a syntax tree into a string.
custom_keyword
Define a type that supports parsing and printing a given identifier as if it were a keyword.
custom_punctuation
Define a type that supports parsing and printing a multi-character symbol as if it were a punctuation token.
debug_assert_id
Errors handling.
debug_assert_identical
Errors handling. Macro asserts that two expressions are identical to each other. Unlike std::assert_eq it is removed from a release build. Alias of debug_assert_id.
debug_assert_ni
Errors handling. Macro asserts that two expressions are not identical to each other. Unlike std::assert_eq it is removed from a release build.
debug_assert_not_identical
Errors handling. Macro asserts that two expressions are not identical to each other. Unlike std::assert_eq it is removed from a release build.
deque
Function and structures to work with collections. Creates a VecDeque from a list of elements.
dlist
Function and structures to work with collections. Creates a Vec from a list of elements.
format_ident
Formatting macro for constructing Idents.
hmap
Function and structures to work with collections. Creates a HashMap from a list of key-value pairs.
hset
Function and structures to work with collections. Creates a HashSet from a list of elements.
into_bmap
Function and structures to work with collections. Creates a BTreeMap from a list of key-value pairs.
into_bset
Function and structures to work with collections. Creates a BTreeSet from a list of elements.
into_dlist
Function and structures to work with collections. Creates a Vec from a list of elements.
into_hmap
Function and structures to work with collections. Creates a HashMap from a list of key-value pairs.
into_hset
Function and structures to work with collections. Creates a HashSet from a list of elements.
into_llist
Function and structures to work with collections. Creates a LinkedList from a llist of elements.
into_vec
Function and structures to work with collections. Creates a Vec from a list of elements.
into_vecd
Function and structures to work with collections. Creates a VecDeque from a list of elements.
llist
Function and structures to work with collections. Creates a LinkedList from a llist of elements.
parenthesized
Parse a set of parentheses and expose their content to subsequent parsers.
parse_macro_input
Parse the input TokenStream of a macro, triggering a compile error if the tokens fail to parse.
parse_qt
Quasi-quotation macro that accepts input like the quote! macro but uses type inference to figure out a return type for those tokens.
parse_qt_spanned
This macro is parse_quote! + quote_spanned!.
parse_quote
Quasi-quotation macro that accepts input like the quote! macro but uses type inference to figure out a return type for those tokens.
parse_quote_spanned
This macro is parse_quote! + quote_spanned!.
qt
The whole point.
quote
The whole point.
quote_spanned
Same as quote!, but applies a given span to all tokens originating within the macro invocation.
return_syn_err
Macro to generate syn error either with span of a syntax tree element or with default one proc_macro2::Span::call_site().
syn_err
Macro to generate syn error either with span of a syntax tree element or with default one proc_macro2::Span::call_site().
tree_diagnostics_str
Macro for diagnostics purpose to export both syntax tree and source code behind it into a string.
tree_print
Macro for diagnostics purpose to print both syntax tree and source code behind it with syntax tree.

Structs§

AbsolutePath
A new type representing an absolute path.
AttributePropertyBoolean
A generic boolean attribute property. Defaults to false.
AttributePropertyBooleanMarker
Default marker for AttributePropertyBoolean. Used if no marker is defined as parameter.
AttributePropertyOptionalBoolean
A generic optional boolean attribute property: Option< bool >. Defaults to false.
AttributePropertyOptionalBooleanMarker
Default marker for AttributePropertyOptionalSingletone. Used if no marker is defined as parameter.
AttributePropertyOptionalSingletone
A generic attribute property for switching on/off. Has 3 states: None, Some( true ), Some( false ). Defaults to None.
AttributePropertyOptionalSingletoneMarker
Default marker for AttributePropertyOptionalSingletone. Used if no marker is defined as parameter.
AttributePropertyOptionalSyn
Property of an attribute which simply wraps one of the standard syn types and keeps it optional.
AttributePropertyOptionalSynMarker
Default marker for AttributePropertyOptionalSyn. Used if no marker is defined as parameter.
AttributePropertySingletone
A generic boolean attribute property which consists of only keyword. This property can have two states: true, or false. Defaults to false.
AttributePropertySingletoneMarker
Default marker for AttributePropertySingletone. Used if no marker is defined as parameter.
AttributePropertySyn
Property of an attribute which simply wraps one of the standard syn types.
AttributePropertySynMarker
Default marker for AttributePropertySyn. Used if no marker is defined as parameter.
AttributesInner
Attribute which is inner.
AttributesOuter
Represents a collection of outer attributes.
BTreeMap
Function and structures to work with collections. An ordered map based on a B-Tree.
BTreeSet
Function and structures to work with collections. An ordered set based on a B-Tree.
BinaryHeap
Function and structures to work with collections. A priority queue implemented with a binary heap.
Bmap
Function and structures to work with collections. An ordered map based on a B-Tree.
Bset
Function and structures to work with collections. An ordered set based on a B-Tree.
CanonicalPath
Caninical path.
CrateDir
Path to crate directory
CurrentPath
Symbolize current path.
DependencyRef
A dependency of the main crate
Deque
Function and structures to work with collections. A double-ended queue implemented with a growable ring buffer.
Dlist
Function and structures to work with collections. A contiguous growable array type, written as Vec<T>, short for ‘vector’.
EitherDirOrFile
Wrapper over data_type::Either< CrateDir, ManifestFile > with util methods.
Equation
Represents an equation parsed from a procedural macro input.
HashMap
Function and structures to work with collections. A hash map implemented with quadratic probing and SIMD lookup.
HashSet
Function and structures to work with collections. A hash set implemented as a HashMap where the value is ().
Hmap
Function and structures to work with collections. A hash map implemented with quadratic probing and SIMD lookup.
Hset
Function and structures to work with collections. A hash set implemented as a HashMap where the value is ().
LinkedList
Function and structures to work with collections. A doubly-linked list with owned nodes.
Llist
Function and structures to work with collections. A doubly-linked list with owned nodes.
Manifest
Hold manifest data.
ManifestFile
Path to crate directory
Many
Parse as much elements as possible.
Map
Function and structures to work with collections. A hash map implemented with quadratic probing and SIMD lookup.
NativePath
Caninical path.
Pair
Pair of two elements of parsing.
Set
Function and structures to work with collections. A hash set implemented as a HashMap where the value is ().
SourceFile
Path to a source file
Tokens
Tokens is a wrapper around proc_macro2::TokenStream. It is designed to facilitate the parsing and manipulation of token streams within procedural macros.
Vec
Function and structures to work with collections. A contiguous growable array type, written as Vec<T>, short for ‘vector’.
VecDeque
Function and structures to work with collections. A double-ended queue implemented with a growable ring buffer.
Version
Version entity. Wrapper for a SemVer structure
Workspace
Stores information about the current workspace.
WorkspacePackageRef
Facade for cargo_metadata::Package

Enums§

DependencyKind
Dependencies can come in three kinds
Diff
A type returned by the diff_with function.
Either
The enum Either with variants Left and Right is a general purpose sum type with two cases.
EitherOrBoth
Value that either holds a single A or B, or both.
FoldWhile
An enum used for controlling the execution of fold_while.
MinMaxResult
MinMaxResult is an enum returned by minmax.
Package
Represents different types of packages in a Cargo workspace.
PathError
PathError enum represents errors when creating a CrateDir object.
Position
The first component of the value yielded by WithPosition. Indicates the position of this element in the iterator results.
WorkspaceInitError
Represents errors related to workspace operations.

Traits§

AsCode
A trait for converting an object to its code representation.
AsMuchAsPossibleNoDelimiter
Marker saying how to parse several elements of such type in a row.
Assign
Provides a generic interface for setting a component of a certain type on an object.
AssignWithType
The AssignWithType trait provides a mechanism to set a component on an object, utilizing the type information explicitly. This trait extends the functionality of Assign by allowing implementers to specify the component’s type at the method call site, enhancing expressiveness in code that manipulates object states.
AttributeComponent
Trait for components of a structure aggregating attributes that can be constructed from a meta attribute.
AttributePropertyComponent
Trait for properties of an attribute component that can be identified by a keyword.
CodeItems
A trait for retrieving an iterator over items of a source file.
Entries
A trait that defines a method for retrieving an iterator over entries.
ErrWith
Errors handling. This trait allows adding extra context or information to an error, creating a tuple of the additional context and the original error. This is particularly useful for error handling when you want to include more details in the error without losing the original error value.
IntoInterval
Convert it into canonical interval.
IterExt
Extension of iterator.
IterTrait
Trait that encapsulates a clonable iterator with specific characteristics, tailored for use with the syn crate.
IterableInterval
Interval adapter. Interface to interval-like structures.
Itertools
An Iterator blanket implementation that provides extra adaptors and methods.
Name
Trait to get name of an syntax element.
NonIterableInterval
Interval adapter. Interface to interval-like structures.
OptionExt
Extension trait to provide a method for setting a component on an Option<Self> if the Option is currently None. If the Option is Some, the method will delegate to the Assign trait’s assign method.
PathJoined
A trait for joining path components into a PathBuf.
PeekingNext
An iterator that allows peeking at an element before deciding to accept it.
Sources
A trait that defines a method for retrieving an iterator over source files.
Spanned
A trait that can provide the Span of the complete contents of a syntax tree node.
TransitiveTryFrom
A trait to perform a transitive try_from conversion.
TransitiveTryInto
A trait to perform a transitive try_into conversion.
_IterTrait
Trait that encapsulates an iterator with specific characteristics and implemetning CloneDyn.

Functions§

cicd_renew
List packages.
indentation
Adds indentation and optional prefix/postfix to each line of the given string.
is
Check is string a keyword.
report_format
Formats a debugging report for code transformation processes, detailing both the original and generated code for easy comparison and review.
report_print
Prints a debugging report for a pair of token streams to the standard output.
test
run tests in specified crate run tests in specified crate
workspace_renew
List packages.

Type Aliases§

BoxedIter
Type alias for boxed _IterTrait trait objects.
ParseStream
Input to a Syn parser function.
ResultWithReport
Errors handling. A type alias for a Result that contains an error which is a tuple of a report and an original error.

Derive Macros§

Assign
Derives the Assign trait for struct fields, allowing each field to be set with a value that can be converted into the field’s type.
Former
Derive macro for generating a Former struct, applying a Builder Pattern to the annotated struct.