#[non_exhaustive]pub struct ServerVariable {
pub default_value: String,
pub description: Option<String>,
pub enum_values: Option<Vec<String>>,
pub extensions: Option<Extensions>,
}
Expand description
Implements OpenAPI Server Variable used to substitute variables in Server::url
.
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.default_value: String
Default value used to substitute parameter if no other value is being provided.
description: Option<String>
Optional description describing the variable of substitution. Markdown syntax is supported.
enum_values: Option<Vec<String>>
Enum values can be used to limit possible options for substitution. If enum values is used
the ServerVariable::default_value
must contain one of the enum values.
extensions: Option<Extensions>
Optional extensions “x-something”.
Implementations§
Source§impl ServerVariable
impl ServerVariable
Sourcepub fn builder() -> ServerVariableBuilder
pub fn builder() -> ServerVariableBuilder
Construct a new ServerVariableBuilder.
This is effectively same as calling ServerVariableBuilder::new
Trait Implementations§
Source§impl Clone for ServerVariable
impl Clone for ServerVariable
Source§fn clone(&self) -> ServerVariable
fn clone(&self) -> ServerVariable
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Default for ServerVariable
impl Default for ServerVariable
Source§fn default() -> ServerVariable
fn default() -> ServerVariable
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ServerVariable
impl<'de> Deserialize<'de> for ServerVariable
Source§fn 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
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.
Source§impl PartialEq for ServerVariable
impl PartialEq for ServerVariable
Source§impl Serialize for ServerVariable
impl Serialize for ServerVariable
impl Eq for ServerVariable
impl StructuralPartialEq for ServerVariable
Auto Trait Implementations§
impl Freeze for ServerVariable
impl RefUnwindSafe for ServerVariable
impl Send for ServerVariable
impl Sync for ServerVariable
impl Unpin for ServerVariable
impl UnwindSafe for ServerVariable
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.