pub struct Info {
pub title: String,
pub summary: Option<String>,
pub description: Option<String>,
pub terms_of_service: Option<String>,
pub contact: Option<Contact>,
pub license: Option<License>,
pub version: String,
pub extensions: Extensions,
}Expand description
Metadata about the API.
Fields§
§title: StringThe title of the API.
summary: Option<String>A short summary of the API.
description: Option<String>A description of the API. CommonMark syntax may be used.
terms_of_service: Option<String>A URI for the Terms of Service for the API.
contact: Option<Contact>Contact information for the exposed API.
license: Option<License>License information for the exposed API.
version: StringThe version of this API document.
This is not the OpenAPI specification version — that lives on
Document::openapi — nor is it required to
be the implementation’s version.
extensions: ExtensionsSpecification extensions.
Implementations§
Source§impl Info
impl Info
Sourcepub fn new(title: impl Into<String>, version: impl Into<String>) -> Self
pub fn new(title: impl Into<String>, version: impl Into<String>) -> Self
Creates the required fields of an Info Object.
Sourcepub fn with_summary(self, summary: impl Into<String>) -> Self
pub fn with_summary(self, summary: impl Into<String>) -> Self
Sets the short summary.
Sourcepub fn with_description(self, description: impl Into<String>) -> Self
pub fn with_description(self, description: impl Into<String>) -> Self
Sets the description.
Sourcepub fn with_contact(self, contact: Contact) -> Self
pub fn with_contact(self, contact: Contact) -> Self
Sets the contact information.
Sourcepub fn with_license(self, license: License) -> Self
pub fn with_license(self, license: License) -> Self
Sets the license.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Info
impl<'de> Deserialize<'de> for Info
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
impl Eq for Info
impl StructuralPartialEq for Info
Auto Trait Implementations§
impl Freeze for Info
impl RefUnwindSafe for Info
impl Send for Info
impl Sync for Info
impl Unpin for Info
impl UnsafeUnpin for Info
impl UnwindSafe for Info
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.