[][src]Struct safe_vault::Config

pub struct Config { /* fields omitted */ }

Vault configuration

Methods

impl Config[src]

pub fn new() -> Self[src]

Returns a new Config instance. Tries to read from the default vault config file location, and overrides values with any equivalent command line args.

pub fn wallet_address(&self) -> Option<&String>[src]

The address to be credited when this vault farms SafeCoin.

pub fn max_capacity(&self) -> u64[src]

Upper limit in bytes for allowed network storage on this vault.

pub fn root_dir(&self) -> PathBuf[src]

Root directory for ChunkStores and cached state. If not set, it defaults to DEFAULT_ROOT_DIR_NAME within env::temp_dir().

pub fn set_root_dir<P: Into<PathBuf>>(&mut self, path: P)[src]

Set the root directory for ChunkStores and cached state.

pub fn quic_p2p_config(&self) -> &QuicP2pConfig[src]

Quic-P2P configuration options.

pub fn set_quic_p2p_config(&mut self, config: QuicP2pConfig)[src]

Set Quic-P2P configuration options.

pub fn listen_on_loopback(&mut self)[src]

Set the Quic-P2P ip configuration to 127.0.0.1.

Trait Implementations

impl PartialEq<Config> for Config[src]

impl Default for Config[src]

impl Clone for Config[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Eq for Config[src]

impl Debug for Config[src]

impl Serialize for Config[src]

impl<'de> Deserialize<'de> for Config[src]

impl StructOpt for Config[src]

fn from_args() -> Self[src]

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
[src]

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
[src]

Gets the struct from any iterator such as a Vec of your making. Read more

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]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<T> Clear for T where
    T: InitializableFromZeroed + ?Sized

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> InitializableFromZeroed for T where
    T: Default

impl<T> Erased for T

impl<T> SendSyncUnwindSafe for T where
    T: Send + Sync + UnwindSafe + ?Sized