pub struct JsonObjectSchema { /* private fields */ }Expand description
A schema for an object
Implementations§
Source§impl JsonObjectSchema
impl JsonObjectSchema
Sourcepub fn new(properties: impl IntoIterator<Item = JsonPropertySchema>) -> Self
pub fn new(properties: impl IntoIterator<Item = JsonPropertySchema>) -> Self
Create a new object schema
Sourcepub fn with_title(self, title: impl ToString) -> Self
pub fn with_title(self, title: impl ToString) -> Self
Set the title of the object
Sourcepub fn with_description(
self,
description: impl Into<Option<&'static str>>,
) -> Self
pub fn with_description( self, description: impl Into<Option<&'static str>>, ) -> Self
Set the description of the object
Trait Implementations§
Source§impl Clone for JsonObjectSchema
impl Clone for JsonObjectSchema
Source§fn clone(&self) -> JsonObjectSchema
fn clone(&self) -> JsonObjectSchema
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for JsonObjectSchema
impl Debug for JsonObjectSchema
Auto Trait Implementations§
impl Freeze for JsonObjectSchema
impl RefUnwindSafe for JsonObjectSchema
impl Send for JsonObjectSchema
impl Sync for JsonObjectSchema
impl Unpin for JsonObjectSchema
impl UnwindSafe for JsonObjectSchema
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