pub struct ContentDescriptor {
pub name: String,
pub summary: Option<String>,
pub description: Option<String>,
pub required: bool,
pub schema: Schema,
pub deprecated: bool,
}
Expand description
Content descriptors are that do just as they suggest - describe content. They are reusable ways of describing either parameters or results.
Fields§
§name: String
The name of the content being described.
If the content described is a method parameter assignable ByName
,
this field must be the name of the parameter.
summary: Option<String>
A short summary of the content that is being described.
description: Option<String>
A verbose explanation of the content being described.
GitHub Flavored Markdown syntax may be used for rich text representation.
required: bool
Determines if the content is a required field.
Default is false
.
schema: Schema
A Schema
that describes what is allowed in the content.
deprecated: bool
Whether the content is deprecated.
Default is false
.
Trait Implementations§
Source§impl Clone for ContentDescriptor
impl Clone for ContentDescriptor
Source§fn clone(&self) -> ContentDescriptor
fn clone(&self) -> ContentDescriptor
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 ContentDescriptor
impl Debug for ContentDescriptor
Source§impl<'de> Deserialize<'de> for ContentDescriptor
impl<'de> Deserialize<'de> for ContentDescriptor
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ContentDescriptor
impl RefUnwindSafe for ContentDescriptor
impl Send for ContentDescriptor
impl Sync for ContentDescriptor
impl Unpin for ContentDescriptor
impl UnwindSafe for ContentDescriptor
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