pub struct ContactBuilder { /* private fields */ }Expand description
Builder for Contact with chainable configuration methods to create a new Contact.
See the InfoBuilder for combined usage example.
Implementations§
Source§impl ContactBuilder
impl ContactBuilder
Sourcepub fn new() -> ContactBuilder
pub fn new() -> ContactBuilder
Constructs a new ContactBuilder.
Source§impl ContactBuilder
impl ContactBuilder
Sourcepub fn name<S>(self, name: Option<S>) -> ContactBuilder
pub fn name<S>(self, name: Option<S>) -> ContactBuilder
Add name contact person or organization of the API.
Sourcepub fn url<S>(self, url: Option<S>) -> ContactBuilder
pub fn url<S>(self, url: Option<S>) -> ContactBuilder
Add url pointing to the contact information of the API.
Sourcepub fn email<S>(self, email: Option<S>) -> ContactBuilder
pub fn email<S>(self, email: Option<S>) -> ContactBuilder
Add email of the contact person or organization of the API.
Sourcepub fn extensions(self, extensions: Option<Extensions>) -> ContactBuilder
pub fn extensions(self, extensions: Option<Extensions>) -> ContactBuilder
Add openapi extensions (x-something) of the API.
Trait Implementations§
Source§impl Default for ContactBuilder
impl Default for ContactBuilder
Source§fn default() -> ContactBuilder
fn default() -> ContactBuilder
Returns the “default value” for a type. Read more
Source§impl From<Contact> for ContactBuilder
impl From<Contact> for ContactBuilder
Source§fn from(value: Contact) -> ContactBuilder
fn from(value: Contact) -> ContactBuilder
Converts to this type from the input type.
Source§impl From<ContactBuilder> for Contact
impl From<ContactBuilder> for Contact
Source§fn from(value: ContactBuilder) -> Contact
fn from(value: ContactBuilder) -> Contact
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ContactBuilder
impl RefUnwindSafe for ContactBuilder
impl Send for ContactBuilder
impl Sync for ContactBuilder
impl Unpin for ContactBuilder
impl UnwindSafe for ContactBuilder
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