pub struct SwitchConfig {
pub metadata_key: String,
pub cases: HashMap<String, Endpoint>,
pub default: Option<Box<Endpoint>>,
}Fields§
§metadata_key: StringThe metadata key to inspect for routing decisions.
cases: HashMap<String, Endpoint>A map of values to endpoints.
default: Option<Box<Endpoint>>The default endpoint if no case matches.
Trait Implementations§
Source§impl Clone for SwitchConfig
impl Clone for SwitchConfig
Source§fn clone(&self) -> SwitchConfig
fn clone(&self) -> SwitchConfig
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 SwitchConfig
impl Debug for SwitchConfig
Source§impl<'de> Deserialize<'de> for SwitchConfig
impl<'de> Deserialize<'de> for SwitchConfig
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 SwitchConfig
impl !RefUnwindSafe for SwitchConfig
impl Send for SwitchConfig
impl Sync for SwitchConfig
impl Unpin for SwitchConfig
impl !UnwindSafe for SwitchConfig
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