Crate compose_spec_macros
source ·Expand description
Procedural macros for use within the compose_spec crate.
AsShort- derivecompose_spec::AsShort.FromShort- deriveFrom<Short>, designed for use in combination withAsShort.SerializeDisplay- deriveSerializeusing the type’sDisplayimplementation.DeserializeFromStr- deriveDeserializeusing the type’sFromStrimplementation.DeserializeTryFromString- deriveDeserializeusing the type’sTryFrom<String>implementation.platforms!- definePlatform,Os,Arch, and{Os}Archenums and implementations.
§Warning
These macros are not designed to be used outside of the compose_spec crate.
Macros§
- Macro which defines
Platform,Os,Archand{Os}Archenums and implementations.
Derive Macros§
- Derive macro for
AsShort. - Derive macro for
Defaultwhich allows setting custom values via#[default = ...]attributes. - Derive macro for
Deserializewhich uses the type’sFromStrimplementation to deserialize it from a string. - Derive macro for
Deserializewhich uses the type’sTryFrom<String>implementation to deserialize it from a string. - Derive macro for
From<Short>, for use in combination with derivingAsShort.