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
Auto Trait Implementations§
impl Forget for PropertyInfo
impl Freeze for PropertyInfo
impl Move for PropertyInfo
impl RefUnwindSafe for PropertyInfo
impl Send for PropertyInfo
impl Sync for PropertyInfo
impl Unpin for PropertyInfo
impl UnsafeUnpin 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