[−][src]Struct sn_node::Config
Node configuration
Implementations
impl Config
[src]
pub fn new() -> Self
[src]
Returns a new Config
instance. Tries to read from the default node config file location,
and overrides values with any equivalent command line args.
pub fn wallet_id(&self) -> Option<&String>
[src]
The address to be credited when this node farms SafeCoin.
pub fn is_first(&self) -> bool
[src]
Is this the first node in a section?
pub fn is_local(&self) -> bool
[src]
Is the node running for a local section?
pub fn max_capacity(&self) -> u64
[src]
Upper limit in bytes for allowed network storage on this node.
pub fn root_dir(&self) -> Result<PathBuf>
[src]
Root directory for ChunkStore
s and cached state. If not set, it defaults to
DEFAULT_ROOT_DIR_NAME
within the project's data directory (see Config::root_dir
for the
directories on each platform).
pub fn set_root_dir<P: Into<PathBuf>>(&mut self, path: P)
[src]
Set the root directory for ChunkStore
s and cached state.
pub fn set_log_dir<P: Into<PathBuf>>(&mut self, path: P)
[src]
Set the directory to write the logs.
pub fn verbose(&self) -> Level
[src]
Get the log level.
pub fn network_config(&self) -> &NetworkConfig
[src]
Network configuration options.
pub fn set_network_config(&mut self, config: NetworkConfig)
[src]
Set network configuration options.
pub fn completions(&self) -> &Option<String>
[src]
Get the completions option
pub fn log_dir(&self) -> &Option<PathBuf>
[src]
Directory where to write log file/s if specified
pub fn update(&self) -> bool
[src]
Attempt to self-update?
pub fn update_only(&self) -> bool
[src]
Attempt to self-update without starting the node process
pub fn listen_on_loopback(&mut self)
[src]
Set the Quic-P2P ip
configuration to 127.0.0.1.
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<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__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::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl StructOpt for Config
[src]
pub fn clap<'a, 'b>() -> App<'a, 'b>
[src]
pub fn from_clap(matches: &ArgMatches<'_>) -> Self
[src]
pub fn from_args() -> Self
[src]
pub fn from_args_safe() -> Result<Self, Error>
[src]
pub fn from_iter<I>(iter: I) -> Self where
I: IntoIterator,
<I as IntoIterator>::Item: Into<OsString>,
<I as IntoIterator>::Item: Clone,
[src]
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,
[src]
I: IntoIterator,
<I as IntoIterator>::Item: Into<OsString>,
<I as IntoIterator>::Item: Clone,
impl StructOptInternal for Config
[src]
pub fn augment_clap<'a, 'b>(app: App<'a, 'b>) -> App<'a, 'b>
[src]
pub fn is_subcommand() -> bool
[src]
pub fn from_subcommand(
_sub: (&'b str, Option<&'b ArgMatches<'a>>)
) -> Option<Self>
[src]
_sub: (&'b str, Option<&'b ArgMatches<'a>>)
) -> Option<Self>
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> Clear for T where
T: InitializableFromZeroed + ?Sized,
T: InitializableFromZeroed + ?Sized,
pub fn clear(&mut self)
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> InitializableFromZeroed for T where
T: Default,
T: Default,
pub unsafe fn initialize(place: *mut T)
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>,