#[non_exhaustive]pub struct ServerConfig {
pub channels: HashMap<String, ChannelConfig>,
pub versions: Vec<Version>,
pub default_version: String,
/* private fields */
}Expand description
Server configuration for supported versions and release channels.
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.channels: HashMap<String, ChannelConfig>Output only. Mapping from release channel to channel config.
versions: Vec<Version>Output only. Supported versions, e.g.: [“1.4.0”, “1.5.0”].
default_version: StringOutput only. Default version, e.g.: “1.4.0”.
Implementations§
Source§impl ServerConfig
impl ServerConfig
pub fn new() -> Self
Sourcepub fn set_channels<T, K, V>(self, v: T) -> Self
pub fn set_channels<T, K, V>(self, v: T) -> Self
Sets the value of channels.
Sourcepub fn set_versions<T, V>(self, v: T) -> Self
pub fn set_versions<T, V>(self, v: T) -> Self
Sets the value of versions.
Sourcepub fn set_default_version<T: Into<String>>(self, v: T) -> Self
pub fn set_default_version<T: Into<String>>(self, v: T) -> Self
Sets the value of default_version.
Trait Implementations§
Source§impl Clone for ServerConfig
impl Clone for ServerConfig
Source§fn clone(&self) -> ServerConfig
fn clone(&self) -> ServerConfig
Returns a duplicate 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 Debug for ServerConfig
impl Debug for ServerConfig
Source§impl Default for ServerConfig
impl Default for ServerConfig
Source§fn default() -> ServerConfig
fn default() -> ServerConfig
Returns the “default value” for a type. Read more
Source§impl Message for ServerConfig
impl Message for ServerConfig
Source§impl PartialEq for ServerConfig
impl PartialEq for ServerConfig
impl StructuralPartialEq for ServerConfig
Auto Trait Implementations§
impl Freeze for ServerConfig
impl RefUnwindSafe for ServerConfig
impl Send for ServerConfig
impl Sync for ServerConfig
impl Unpin for ServerConfig
impl UnwindSafe for ServerConfig
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