Skip to main content

QueryScalar

Trait QueryScalar 

Source
pub trait QueryScalar {
    const OPENAPI_TYPE: &'static str = "string";
}
Expand description

A type that can appear as a query-parameter value.

Implemented for the primitives; implement it for a domain newtype or a unit-only enum that serializes as a plain string. The bound exists to keep nested structs out of query parameters — see the module docs.

Provided Associated Constants§

Source

const OPENAPI_TYPE: &'static str = "string"

The OpenAPI primitive type this value renders as.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl QueryScalar for String

Source§

const OPENAPI_TYPE: &'static str = "string"

Source§

impl QueryScalar for bool

Source§

const OPENAPI_TYPE: &'static str = "boolean"

Source§

impl QueryScalar for f32

Source§

const OPENAPI_TYPE: &'static str = "number"

Source§

impl QueryScalar for f64

Source§

const OPENAPI_TYPE: &'static str = "number"

Source§

impl QueryScalar for i8

Source§

const OPENAPI_TYPE: &'static str = "integer"

Source§

impl QueryScalar for i16

Source§

const OPENAPI_TYPE: &'static str = "integer"

Source§

impl QueryScalar for i32

Source§

const OPENAPI_TYPE: &'static str = "integer"

Source§

impl QueryScalar for i64

Source§

const OPENAPI_TYPE: &'static str = "integer"

Source§

impl QueryScalar for i128

Source§

const OPENAPI_TYPE: &'static str = "integer"

Source§

impl QueryScalar for isize

Source§

const OPENAPI_TYPE: &'static str = "integer"

Source§

impl QueryScalar for str

Source§

const OPENAPI_TYPE: &'static str = "string"

Source§

impl QueryScalar for u8

Source§

const OPENAPI_TYPE: &'static str = "integer"

Source§

impl QueryScalar for u16

Source§

const OPENAPI_TYPE: &'static str = "integer"

Source§

impl QueryScalar for u32

Source§

const OPENAPI_TYPE: &'static str = "integer"

Source§

impl QueryScalar for u64

Source§

const OPENAPI_TYPE: &'static str = "integer"

Source§

impl QueryScalar for u128

Source§

const OPENAPI_TYPE: &'static str = "integer"

Source§

impl QueryScalar for usize

Source§

const OPENAPI_TYPE: &'static str = "integer"

Implementors§