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,
},
}
Expand description
Configure the network bindings for underlying kitsune transports
Variants
A transport that uses the local memory transport protocol (this is mainly for testing).
Fields of Mem
A transport that uses the QUIC protocol
Fields of Quic
bind_to: Option<Url2>
To which network interface / port should we bind? Default: “kitsune-quic://0.0.0.0:0”.
override_host: Option<String>
If you have port-forwarding set up, or wish to apply a vanity domain name, you may need to override the local NIC ip. Default: None = use NIC ip.
override_port: Option<u16>
If you have port-forwarding set up, you may need to override the local NIC port. Default: None = use NIC port.
A transport that tls tunnels through a sub-transport (ALPN kitsune-proxy/0)
Fields of Proxy
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
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