[−][src]Struct safe_core::QuicP2pConfig
QuicP2p configurations
Fields
hard_coded_contacts: HashSet<NodeInfo, 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.
our_complete_cert: Option<SerialisableCertificate>
Our TLS Certificate. If passed as a command line argument, it should be encoded in base64
(see SerialisableCertificate::to_string
).
our_type: OurType
Specify if we are a client or a node
Methods
impl Config
[src]
pub fn read_or_construct_default(
user_override: Option<&Dirs>
) -> Result<Config, Error>
[src]
user_override: Option<&Dirs>
) -> 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 with_default_cert() -> Config
[src]
Create a default Config with random Certificate
Trait Implementations
impl PartialEq<Config> for Config
[src]
impl Eq for Config
[src]
impl Serialize for Config
[src]
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]
fn clap<'a, 'b>() -> App<'a, 'b>
[src]
fn from_clap(matches: &ArgMatches) -> Config
[src]
fn from_args() -> Self
Gets the struct from the command line arguments. Print the error message and quit the program in case of failure. Read more
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,
Gets the struct from any iterator such as a Vec
of your making. Print the error message and quit the program in case of failure. Read more
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,
Gets the struct from any iterator such as a Vec
of your making. Read more
impl Debug for Config
[src]
impl Clone for Config
[src]
fn clone(&self) -> Config
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<'de> Deserialize<'de> for Config
[src]
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 Default for Config
[src]
Auto Trait Implementations
impl Send for Config
impl Unpin for Config
impl Sync for Config
impl UnwindSafe for Config
impl RefUnwindSafe for Config
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
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.
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.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
impl<T> Clear for T where
T: InitializableFromZeroed + ?Sized,
T: InitializableFromZeroed + ?Sized,
fn clear(&mut self)
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> InitializableFromZeroed for T where
T: Default,
T: Default,
unsafe fn initialize(place: *mut T)
impl<T> DebugAny for T where
T: Any + Debug,
T: Any + Debug,
impl<T> CloneAny for T where
T: Clone + Any,
T: Clone + Any,
fn clone_any(&self) -> Box<dyn CloneAny + 'static>
fn clone_any_send(&self) -> Box<dyn CloneAny + 'static + Send> where
T: Send,
T: Send,
fn clone_any_sync(&self) -> Box<dyn CloneAny + 'static + Sync> where
T: Sync,
T: Sync,
fn clone_any_send_sync(&self) -> Box<dyn CloneAny + 'static + Send + Sync> where
T: Send + Sync,
T: Send + Sync,
impl<T> UnsafeAny for T where
T: Any,
T: Any,
impl<T> Erased for T
impl<T> SendSyncUnwindSafe for T where
T: Send + Sync + UnwindSafe + ?Sized,
T: Send + Sync + UnwindSafe + ?Sized,