#[non_exhaustive]pub struct Info {
pub title: String,
pub description: Option<String>,
pub terms_of_service: Option<String>,
pub contact: Option<Contact>,
pub license: Option<License>,
pub version: String,
pub extensions: PropMap<String, Value>,
}
Expand description
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.title: String
Title of the API.
description: Option<String>
Optional description of the API.
Value supports markdown syntax.
terms_of_service: Option<String>
Optional url for terms of service.
contact: Option<Contact>
Contact information of exposed API.
See more details at: https://spec.openapis.org/oas/latest.html#contact-object.
license: Option<License>
License of the API.
See more details at: https://spec.openapis.org/oas/latest.html#license-object.
version: String
Document version typically the API version.
extensions: PropMap<String, Value>
Optional extensions “x-something”
Implementations§
Source§impl Info
impl Info
Sourcepub fn version<I: Into<String>>(self, version: I) -> Self
pub fn version<I: Into<String>>(self, version: I) -> Self
Add version of the api document typically the API version.
Sourcepub fn description<S: Into<String>>(self, description: S) -> Self
pub fn description<S: Into<String>>(self, description: S) -> Self
Add description of the API.
Sourcepub fn terms_of_service<S: Into<String>>(self, terms_of_service: S) -> Self
pub fn terms_of_service<S: Into<String>>(self, terms_of_service: S) -> Self
Add url for terms of the API.
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 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,
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.