#[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 configuraiton 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
sourceimpl<'de> Deserialize<'de> for Info
impl<'de> Deserialize<'de> for Info
sourcefn 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
sourceimpl From<Info> for InfoBuilder
impl From<Info> for InfoBuilder
sourceimpl From<InfoBuilder> for Info
impl From<InfoBuilder> for Info
sourcefn from(value: InfoBuilder) -> Self
fn from(value: InfoBuilder) -> Self
Converts to this type from the input type.
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more