[][src]Struct sequoia_core::Config

pub struct Config(_);

Represents a Context configuration.

A context can be configured using the builder pattern with Context::configure:

let c = Context::configure()
            .network_policy(NetworkPolicy::Offline)
            .build()?;

You can create ephemeral context that are useful for tests and one-shot programs:

let c = Context::configure().ephemeral().build()?;
let ephemeral_home = c.home().to_path_buf();
// Do some tests.
drop(c);
assert!(! ephemeral_home.exists());

Methods

impl Config[src]

pub fn build(self) -> Result<Context>[src]

Finalizes the configuration and returns a Context.

pub fn home<P: AsRef<Path>>(self, home: P) -> Self[src]

Sets the directory containing shared state.

pub fn set_home<P: AsRef<Path>>(&mut self, home: P) -> PathBuf[src]

Sets the directory containing shared state.

pub fn lib<P: AsRef<Path>>(self, lib: P) -> Self[src]

Sets the directory containing backend servers.

pub fn set_lib<P: AsRef<Path>>(&mut self, lib: P) -> PathBuf[src]

Sets the directory containing backend servers.

pub fn network_policy(self, policy: NetworkPolicy) -> Self[src]

Sets the network policy.

pub fn set_network_policy(&mut self, policy: NetworkPolicy) -> NetworkPolicy[src]

Sets the network policy.

pub fn ipc_policy(self, policy: IPCPolicy) -> Self[src]

Sets the IPC policy.

pub fn set_ipc_policy(&mut self, policy: IPCPolicy) -> IPCPolicy[src]

Sets the IPC policy.

pub fn ephemeral(self) -> Self[src]

Makes this context ephemeral.

pub fn set_ephemeral(&mut self) -> bool[src]

Makes this context ephemeral.

Auto Trait Implementations

impl RefUnwindSafe for Config

impl Send for Config

impl Sync for Config

impl Unpin for Config

impl UnwindSafe for Config

Blanket Implementations

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

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

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

impl<T> From<T> for T[src]

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

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<V, T> VZip<V> for T where
    V: MultiLane<T>,