Struct utoipa::openapi::server::ServerVariableBuilder
source · pub struct ServerVariableBuilder { /* private fields */ }
Expand description
Builder for ServerVariable
with chainable configuration methods to create a new ServerVariable
.
Implementations§
source§impl ServerVariableBuilder
impl ServerVariableBuilder
sourcepub fn new() -> ServerVariableBuilder
pub fn new() -> ServerVariableBuilder
Constructs a new ServerVariableBuilder
.
sourcepub fn build(self) -> ServerVariable
pub fn build(self) -> ServerVariable
Constructs a new ServerVariable
taking all fields values from this object.
source§impl ServerVariableBuilder
impl ServerVariableBuilder
sourcepub fn default_value<S: Into<String>>(self, default_value: S) -> Self
pub fn default_value<S: Into<String>>(self, default_value: S) -> Self
Add default value for substitution.
sourcepub fn description<S: Into<String>>(self, description: Option<S>) -> Self
pub fn description<S: Into<String>>(self, description: Option<S>) -> Self
Add or change description of substituted parameter.
sourcepub fn enum_values<I: IntoIterator<Item = V>, V: Into<String>>(
self,
enum_values: Option<I>
) -> Self
pub fn enum_values<I: IntoIterator<Item = V>, V: Into<String>>( self, enum_values: Option<I> ) -> Self
Add or change possible values used to substitute parameter.
Trait Implementations§
source§impl Default for ServerVariableBuilder
impl Default for ServerVariableBuilder
source§impl From<ServerVariable> for ServerVariableBuilder
impl From<ServerVariable> for ServerVariableBuilder
source§fn from(value: ServerVariable) -> Self
fn from(value: ServerVariable) -> Self
Converts to this type from the input type.
source§impl From<ServerVariableBuilder> for ServerVariable
impl From<ServerVariableBuilder> for ServerVariable
source§fn from(value: ServerVariableBuilder) -> Self
fn from(value: ServerVariableBuilder) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl RefUnwindSafe for ServerVariableBuilder
impl Send for ServerVariableBuilder
impl Sync for ServerVariableBuilder
impl Unpin for ServerVariableBuilder
impl UnwindSafe for ServerVariableBuilder
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