pub struct MappingServiceConfig {
pub enabled: bool,
pub port: u16,
pub host: String,
pub available_versions: Vec<String>,
pub default_version: String,
pub latency: LatencyConfig,
pub failure_injection: FailureInjectionConfig,
pub cache_enabled: bool,
}Expand description
Configuration for Mapping Service Simulator
Fields§
§enabled: boolWhether this simulator is enabled
port: u16Port to listen on
host: StringHost to bind to
available_versions: Vec<String>Available mapping versions
default_version: StringDefault version to return
latency: LatencyConfigLatency configuration
failure_injection: FailureInjectionConfigFailure injection configuration
cache_enabled: boolWhether to cache mappings in memory
Implementations§
Source§impl MappingServiceConfig
impl MappingServiceConfig
pub fn socket_addr(&self) -> String
pub fn with_versions(self, versions: Vec<String>) -> Self
pub fn with_default_version(self, version: &str) -> Self
Trait Implementations§
Source§impl Clone for MappingServiceConfig
impl Clone for MappingServiceConfig
Source§fn clone(&self) -> MappingServiceConfig
fn clone(&self) -> MappingServiceConfig
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 MappingServiceConfig
impl Debug for MappingServiceConfig
Source§impl Default for MappingServiceConfig
impl Default for MappingServiceConfig
Source§impl<'de> Deserialize<'de> for MappingServiceConfig
impl<'de> Deserialize<'de> for MappingServiceConfig
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
Auto Trait Implementations§
impl Freeze for MappingServiceConfig
impl RefUnwindSafe for MappingServiceConfig
impl Send for MappingServiceConfig
impl Sync for MappingServiceConfig
impl Unpin for MappingServiceConfig
impl UnsafeUnpin for MappingServiceConfig
impl UnwindSafe for MappingServiceConfig
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