Trait poem_openapi::types::Type[][src]

pub trait Type: Send + Sync {
    type RawValueType;

    const IS_REQUIRED: bool;

    fn name() -> Cow<'static, str>;
fn schema_ref() -> MetaSchemaRef;
fn as_raw_value(&self) -> Option<&Self::RawValueType>; fn register(registry: &mut Registry) { ... } }
Expand description

Represents a OpenAPI type.

Associated Types

The raw type used for validator.

Usually it is Self, but the wrapper type is its internal type.

For example:

i32::RawValueType is i32 Option<i32>::RawValueType is i32.

Associated Constants

If it is true, it means that this value is required.

Required methods

Returns the name of this type

Get schema reference of this type.

Returns a reference to the raw value.

Provided methods

Register this type to types registry.

Implementations on Foreign Types

Implementors