pub struct ServerBuilder { /* private fields */ }
Implementations§
Source§impl ServerBuilder
impl ServerBuilder
Sourcepub fn new() -> ServerBuilder
pub fn new() -> ServerBuilder
Constructs a new ServerBuilder
.
Source§impl ServerBuilder
impl ServerBuilder
Sourcepub fn url<U>(self, url: U) -> ServerBuilder
pub fn url<U>(self, url: U) -> ServerBuilder
Add url to the target Server
.
Sourcepub fn description<S>(self, description: Option<S>) -> ServerBuilder
pub fn description<S>(self, description: Option<S>) -> ServerBuilder
Add or change description of the Server
.
Sourcepub fn parameter<N, V>(self, name: N, variable: V) -> ServerBuilder
pub fn parameter<N, V>(self, name: N, variable: V) -> ServerBuilder
Add parameter to Server
which is used to substitute values in Server::url
.
name
Defines name of the parameter which is being substituted within the url. If url has{username}
substitution then the name should beusername
.parameter
UseServerVariableBuilder
to define how the parameter is being substituted within the url.
Sourcepub fn extensions(self, extensions: Option<Extensions>) -> ServerBuilder
pub fn extensions(self, extensions: Option<Extensions>) -> ServerBuilder
Add openapi extensions (x-something) of the API.
Trait Implementations§
Source§impl Default for ServerBuilder
impl Default for ServerBuilder
Source§fn default() -> ServerBuilder
fn default() -> ServerBuilder
Returns the “default value” for a type. Read more
Source§impl From<Server> for ServerBuilder
impl From<Server> for ServerBuilder
Source§fn from(value: Server) -> ServerBuilder
fn from(value: Server) -> ServerBuilder
Converts to this type from the input type.
Source§impl From<ServerBuilder> for Server
impl From<ServerBuilder> for Server
Source§fn from(value: ServerBuilder) -> Server
fn from(value: ServerBuilder) -> Server
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ServerBuilder
impl RefUnwindSafe for ServerBuilder
impl Send for ServerBuilder
impl Sync for ServerBuilder
impl Unpin for ServerBuilder
impl UnwindSafe for ServerBuilder
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