Enum kitsune_p2p::TransportConfig [−][src]
pub enum TransportConfig {
Mem {},
Quic {
bind_to: Option<Url2>,
override_host: Option<String>,
override_port: Option<u16>,
},
Proxy {
sub_transport: Box<TransportConfig>,
proxy_config: ProxyConfig,
},
Mock {
mock_network: AdapterFactoryMock,
},
}
Expand description
Configure the network bindings for underlying kitsune transports
Variants
Mem
Fields
A transport that uses the local memory transport protocol (this is mainly for testing).
Quic
Fields
bind_to: Option<Url2>
To which network interface / port should we bind? Default: “kitsune-quic://0.0.0.0:0”.
A transport that uses the QUIC protocol
Proxy
Fields
sub_transport: Box<TransportConfig>
The ‘Proxy’ transport is a wrapper around a sub-transport We also need to define the sub-transport.
proxy_config: ProxyConfig
Determines whether we wish to:
- proxy through a remote
- be a proxy server for others
- be directly addressable, but not proxy for others
A transport that tls tunnels through a sub-transport (ALPN kitsune-proxy/0)
Mock
Fields
mock_network: AdapterFactoryMock
The adaptor for mocking the network.
A mock network for testing.
Trait Implementations
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
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl !RefUnwindSafe for TransportConfig
impl Send for TransportConfig
impl Sync for TransportConfig
impl Unpin for TransportConfig
impl !UnwindSafe for TransportConfig
Blanket Implementations
Mutably borrows from an owned value. Read more
fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more