pub struct LicenseBuilder { /* private fields */ }Implementations§
Source§impl LicenseBuilder
impl LicenseBuilder
Sourcepub fn new() -> LicenseBuilder
pub fn new() -> LicenseBuilder
Constructs a new LicenseBuilder.
Source§impl LicenseBuilder
impl LicenseBuilder
Sourcepub fn url<S: Into<String>>(self, url: Option<S>) -> Self
pub fn url<S: Into<String>>(self, url: Option<S>) -> Self
Add url pointing to the license used in API.
Sourcepub fn extensions(self, extensions: Option<Extensions>) -> Self
pub fn extensions(self, extensions: Option<Extensions>) -> Self
Add openapi extensions (x-something) of the API.
Sourcepub fn identifier<S: Into<String>>(self, identifier: Option<S>) -> Self
pub fn identifier<S: Into<String>>(self, identifier: Option<S>) -> Self
Set identifier of the licence as SPDX-Licenses expression for the API.
The identifier field is mutually exclusive of the url field. E.g. Apache-2.0
Trait Implementations§
Source§impl Default for LicenseBuilder
impl Default for LicenseBuilder
Source§impl From<License> for LicenseBuilder
impl From<License> for LicenseBuilder
Source§impl From<LicenseBuilder> for License
impl From<LicenseBuilder> for License
Source§fn from(value: LicenseBuilder) -> Self
fn from(value: LicenseBuilder) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for LicenseBuilder
impl RefUnwindSafe for LicenseBuilder
impl Send for LicenseBuilder
impl Sync for LicenseBuilder
impl Unpin for LicenseBuilder
impl UnwindSafe for LicenseBuilder
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