pub enum Transport {
Tcp,
Quic,
}Expand description
Transport selected by the pool’s transport: directive.
Controls which network stack the proxy listener binds.
Tcp is the historical default and the only option a build
without the quic Cargo feature can satisfy.
§Examples
use dynomite::conf::Transport;
assert_eq!(Transport::parse("tcp").unwrap(), Transport::Tcp);
assert_eq!(Transport::parse("quic").unwrap(), Transport::Quic);
assert_eq!(Transport::default(), Transport::Tcp);Variants§
Tcp
TCP transport. The historical default and the only
option compiled in when the quic Cargo feature is
off.
Quic
QUIC transport. Requires the quic Cargo feature on
the engine and a server cert / key pair supplied via
the pool’s quic_cert_file: and quic_key_file:
directives.
Implementations§
Source§impl Transport
impl Transport
Sourcepub fn parse(s: &str) -> Result<Self, ConfError>
pub fn parse(s: &str) -> Result<Self, ConfError>
Parse a transport: value (case-insensitive).
§Errors
Returns ConfError::BadServer when the value is
not a recognised transport.
§Examples
use dynomite::conf::Transport;
assert_eq!(Transport::parse("TCP").unwrap(), Transport::Tcp);
assert!(Transport::parse("http").is_err());Trait Implementations§
impl Copy for Transport
Source§impl<'de> Deserialize<'de> for Transport
impl<'de> Deserialize<'de> for Transport
Source§fn deserialize<D: Deserializer<'de>>(de: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(de: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Transport
impl StructuralPartialEq for Transport
Auto Trait Implementations§
impl Freeze for Transport
impl RefUnwindSafe for Transport
impl Send for Transport
impl Sync for Transport
impl Unpin for Transport
impl UnsafeUnpin for Transport
impl UnwindSafe for Transport
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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.