[−][src]Struct sn_routing::TransportConfig
QuicP2p configurations
Fields
hard_coded_contacts: HashSet<SocketAddr, RandomState>
Hard Coded contacts
port: Option<u16>
Port we want to reserve for QUIC. If none supplied we'll use the OS given random port.
ip: Option<IpAddr>
IP address for the listener. If none supplied we'll use the default address (0.0.0.0).
max_msg_size_allowed: Option<u32>
This is the maximum message size we'll allow the peer to send to us. Any bigger message and we'll error out probably shutting down the connection to the peer. If none supplied we'll default to the documented constant.
idle_timeout_msec: Option<u64>
If we hear nothing from the peer in the given interval we declare it offline to us. If none supplied we'll default to the documented constant.
The interval is in milliseconds. A value of 0 disables this feature.
keep_alive_interval_msec: Option<u32>
Interval to send keep-alives if we are idling so that the peer does not disconnect from us declaring us offline. If none is supplied we'll default to the documented constant.
The interval is in milliseconds. A value of 0 disables this feature.
bootstrap_cache_dir: Option<String>
Directory in which the bootstrap cache will be stored. If none is supplied, the platform specific default cache directory is used.
upnp_lease_duration: Option<u32>
Duration of a UPnP port mapping.
forward_port: bool
Specify if port forwarding via UPnP should be done or not
fresh: bool
Use a fresh config without re-using any config available on disk
clean: bool
Clean all existing config available on disk
Implementations
impl Config
[src]
pub fn read_or_construct_default(
user_override: Option<&Path>
) -> Result<Config, Error>
[src]
user_override: Option<&Path>
) -> Result<Config, Error>
Try and read the config off the disk first. If such a file-path doesn't exist it'll create a default one with random certificate and write that to the disk, eventually returning that config to the caller.
pub fn clear_config_from_disk(user_override: Option<&Path>) -> Result<(), Error>
[src]
Clear all configuration files from disk
Trait Implementations
impl Clone for Config
[src]
impl Debug for Config
[src]
impl Default for Config
[src]
impl<'de> Deserialize<'de> for Config
[src]
pub fn deserialize<__D>(
__deserializer: __D
) -> Result<Config, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
[src]
__deserializer: __D
) -> Result<Config, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
impl Eq for Config
[src]
impl PartialEq<Config> for Config
[src]
impl Serialize for Config
[src]
pub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
[src]
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
impl StructOpt for Config
[src]
pub fn clap<'a, 'b>() -> App<'a, 'b>
[src]
pub fn from_clap(matches: &ArgMatches<'_>) -> Config
[src]
pub fn from_args() -> Self
pub fn from_args_safe() -> Result<Self, Error>
pub fn from_iter<I>(iter: I) -> Self where
I: IntoIterator,
<I as IntoIterator>::Item: Into<OsString>,
<I as IntoIterator>::Item: Clone,
I: IntoIterator,
<I as IntoIterator>::Item: Into<OsString>,
<I as IntoIterator>::Item: Clone,
pub fn from_iter_safe<I>(iter: I) -> Result<Self, Error> where
I: IntoIterator,
<I as IntoIterator>::Item: Into<OsString>,
<I as IntoIterator>::Item: Clone,
I: IntoIterator,
<I as IntoIterator>::Item: Into<OsString>,
<I as IntoIterator>::Item: Clone,
impl StructuralEq for Config
[src]
impl StructuralPartialEq for Config
[src]
Auto Trait Implementations
impl RefUnwindSafe for Config
[src]
impl Send for Config
[src]
impl Sync for Config
[src]
impl Unpin for Config
[src]
impl UnwindSafe for Config
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
pub fn equivalent(&self, key: &K) -> bool
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,