Skip to main content

PathScalar

Trait PathScalar 

Source
pub trait PathScalar: Sealed {
    // Required method
    fn path_scalar_schema() -> RefOr<Schema>;
}
Expand description

Sealed trait for primitives usable as scalar Path parameters. Implementations supply the OpenAPI schema for the parameter — done manually (rather than via utoipa::PartialSchema) because common scalar path types like Uuid are recognized by utoipa only via token inspection in derives, not through a PartialSchema impl.

Required Methods§

Source

fn path_scalar_schema() -> RefOr<Schema>

OpenAPI schema to embed for this scalar parameter.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl PathScalar for bool

Source§

impl PathScalar for f32

Source§

impl PathScalar for f64

Source§

impl PathScalar for i8

Source§

impl PathScalar for i16

Source§

impl PathScalar for i32

Source§

impl PathScalar for i64

Source§

impl PathScalar for i128

Source§

impl PathScalar for isize

Source§

impl PathScalar for u8

Source§

impl PathScalar for u16

Source§

impl PathScalar for u32

Source§

impl PathScalar for u64

Source§

impl PathScalar for u128

Source§

impl PathScalar for usize

Source§

impl PathScalar for String

Source§

impl PathScalar for Uuid

Implementors§