Crate swimos_macro_utilities

Crate swimos_macro_utilities 

Source

Modules§

attr_names
attributes

Structs§

Context
An error context for building errors while parsing a token stream.
EnumRepr
A representation of a parsed enumeration from the AST.
EnumVariant
A representation of a parsed enumeration variant from the AST.
FormField
A representation of a parsed field for a form from the AST.
InvalidCaseConvention
NameTransformConsumer
StructRepr
A representation of a parsed struct from the AST.
Symbol
TypeLevelNameTransformConsumer

Enums§

CaseConvention
Case conventions supported for Swim derive macros.
CompoundTypeKind
FieldKind
Enumeration of ways in which fields can be serialized in Recon documents. Unannotated fields are assumed to be annotated as Item::Slot.
Label
An enumeration representing a field or a compound type. This enumeration helps to keep track of elements that may have been renamed when transmuting.
NameTransform
A name transformation that is applied to a single item (such as a field). It may either specify a new name explicitly or define how it should be renamed by a convention.
NameTransformError
StructureKind
Transformation
Description of name transformation strategy that can be read from an attribute applied to an item.
TypeContents
An enumeration representing the contents of an input.
TypeLevelNameTransform
Name transformation strategy that is applied to an entire type, transforming the names of all sub-items of that type.

Traits§

Attributes
A trait for retrieving attributes on a field or compound type that are prefixed by the provided symbol. For example calling this on a syn::DeriveInput that represents the following:
SynOriginal

Functions§

add_bound
Adds the provided bound to all generic parameters used in the fields. Fields for which filter_fn returns false are ignored.
as_const
combine_name_transform
Assemble an NameTransform from transformations read from the attributes on an item.
deconstruct_type
Deconstructs a structure or enumeration into its fields. For example:
get_attribute_meta
Returns a vector of metadata for the provided Attribute that matches the provided Symbol. An error that is encountered is added to the Context and an Err is returned.
get_lit_str
Returns a LitStr if Lit is Lit::Str. Returns an Err if lit doesn’t match and writes an error spanned by lit to ctx.
has_fields
Checks if a data structure has any fields For enums it will check if any variant has fields.
lit_str_to_expr_path
str_to_ident
string_to_ident
to_compile_errors
Consumes a vector of errors and produces a compiler error.
ungroup