pub struct Schema<T: SchemaType> { /* private fields */ }Implementations§
Source§impl<T: SchemaType> Schema<T>
impl<T: SchemaType> Schema<T>
Source§impl Schema<any>
impl Schema<any>
pub fn any_of(schemas: impl SchemaList) -> Self
pub fn all_of(schemas: impl SchemaList) -> Self
pub fn one_of(schemas: impl SchemaList) -> Self
Source§impl<T: SchemaType> Schema<T>
impl<T: SchemaType> Schema<T>
pub fn description(self, description: &'static str) -> Self
pub fn default(self, default: impl Serialize) -> Self
pub fn example(self, example: impl Serialize) -> Self
pub fn enumerates<const N: usize, V: Serialize>( self, enumerates: [V; N], ) -> Self
pub fn deprecated(self) -> Self
pub fn nullable(self) -> Self
pub fn read_only(self) -> Self
pub fn write_only(self) -> Self
Source§impl Schema<array>
impl Schema<array>
pub fn max_items(self, max_items: usize) -> Self
pub fn min_items(self, min_items: usize) -> Self
pub fn max_properties(self, max_properties: usize) -> Self
pub fn min_properties(self, min_properties: usize) -> Self
pub fn max_length(self, max_length: usize) -> Self
pub fn min_length(self, min_length: usize) -> Self
pub fn unique_items(self) -> Self
Source§impl Schema<number>
impl Schema<number>
pub fn format(self, format: &'static str) -> Self
pub fn multiple_of(self, n: impl Into<f64>) -> Self
pub fn maximum(self, maximum: impl Into<f64>) -> Self
pub fn exclusive_maximum(self, maximum: impl Into<f64>) -> Self
pub fn minimum(self, minimum: impl Into<f64>) -> Self
pub fn exclusive_minimum(self, minimum: impl Into<f64>) -> Self
Source§impl Schema<integer>
impl Schema<integer>
pub fn format(self, format: &'static str) -> Self
pub fn multiple_of(self, n: i32) -> Self
pub fn maximum(self, maximum: i32) -> Self
pub fn exclusive_maximum(self, maximum: i32) -> Self
pub fn minimum(self, minimum: i32) -> Self
pub fn exclusive_minimum(self, minimum: i32) -> Self
Trait Implementations§
Source§impl<T: SchemaType> From<Schema<T>> for ResponseHeader
impl<T: SchemaType> From<Schema<T>> for ResponseHeader
Auto Trait Implementations§
impl<T> Freeze for Schema<T>
impl<T> RefUnwindSafe for Schema<T>
impl<T> Send for Schema<T>
impl<T> Sync for Schema<T>
impl<T> Unpin for Schema<T>
impl<T> UnsafeUnpin for Schema<T>
impl<T> UnwindSafe for Schema<T>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more