pub struct PropertyInfo {
pub name: String,
pub schema: SchemaType,
pub description: Option<String>,
pub required: bool,
pub default: Option<String>,
pub example: Option<String>,
}Expand description
Property information for object schemas.
Fields§
§name: StringProperty name.
schema: SchemaTypeProperty type.
description: Option<String>Description.
required: boolWhether required.
default: Option<String>Default value.
example: Option<String>Example value.
Implementations§
Source§impl PropertyInfo
impl PropertyInfo
Sourcepub fn new(name: impl Into<String>, schema: SchemaType) -> Self
pub fn new(name: impl Into<String>, schema: SchemaType) -> Self
Create a new property info.
Sourcepub fn description(self, desc: impl Into<String>) -> Self
pub fn description(self, desc: impl Into<String>) -> Self
Set the description.
Trait Implementations§
Source§impl Clone for PropertyInfo
impl Clone for PropertyInfo
Source§fn clone(&self) -> PropertyInfo
fn clone(&self) -> PropertyInfo
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 moreAuto Trait Implementations§
impl Freeze for PropertyInfo
impl RefUnwindSafe for PropertyInfo
impl Send for PropertyInfo
impl Sync for PropertyInfo
impl Unpin for PropertyInfo
impl UnwindSafe for PropertyInfo
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