Module types

Module types 

Source
Expand description

A TYPES.MD parser and utilities. Defines both data types that represent different typekinds in the SimpleX API docs as well as the parser that turns TYPES.md into an iterator which yields crate::types::ApiType.

The std::fmt::Display implementations render types as the Rust code tailored for simploxide-api-types crate, but you can easily override them with a newtype like CustomFmt<'a>(&'a ApiType);.

Re-exports§

pub use discriminated_union_type::DiscriminatedUnionType;
pub use discriminated_union_type::DisjointedDiscriminatedUnion;
pub use discriminated_union_type::DisjointedDisriminatedUnionVariant;
pub use enum_type::EnumType;
pub use record_type::RecordType;

Modules§

discriminated_union_type
enum_type
record_type

Structs§

Field
FieldFmt
A helper that allows to configure how the field should be rendred.

Enums§

ApiType

Functions§

inner_type
Retrieves the inner type of Option<> or Vec<> Returns None if the field type is not Option or Vec.
is_bool_type
is_compound_type
is_map_type
is_numeric_type
is_optional_type
is_string_type
is_vec_type
parse