#[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,
}
Expand description
OpenAPI Info object represents metadata of the API.
You can use Info::new
to construct a new Info
object or alternatively use InfoBuilder::new
to construct a new Info
with chainable configuration methods.
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.
Implementations§
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
source§impl From<Info> for InfoBuilder
impl From<Info> for InfoBuilder
source§impl From<InfoBuilder> for Info
impl From<InfoBuilder> for Info
source§fn from(value: InfoBuilder) -> Self
fn from(value: InfoBuilder) -> Self
Converts to this type from the input type.
source§impl PartialEq<Info> for Info
impl PartialEq<Info> for Info
impl Eq for Info
impl StructuralEq for Info
impl StructuralPartialEq for Info
Auto Trait Implementations§
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<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.