Crate safe_core[][src]

SAFE core.

Environment Variables

The following environment variables can be set to enable custom options. Each one has higher precedence than its respective config file option (see the "Config" section below).

This example is not tested
SAFE_MOCK_UNLIMITED_MUTATIONS

If set, switch off mutations limit in mock-vault. If safe_core is built with --features=use-mock-routing, then setting this option will allow an unlimited number of mutations. safe_core does not need to be rebuilt for this to take effect.

This example is not tested
SAFE_MOCK_IN_MEMORY_STORAGE

If set, use memory store instead of file store in mock-vault. If safe_core is built with --features=use-mock-routing, then setting this option will use mock-vault's memory store, which is faster than reading/writing to disk. safe_core does not need to be rebuilt for this to take effect.

This example is not tested
SAFE_MOCK_VAULT_PATH

If this is set and file storage is being used (mock_in_memory_storage is false), use this as the path for mock-vault.

Config

You can create a config file with custom options following the example in sample_config/. The file should be named <exe>.safe_core.config. The available options are as follows:

This example is not tested
mock_unlimited_mutations

If true, switch off mutations limit in mock-vault. If safe_core is built with --features=use-mock-routing, then setting this option will allow an unlimited number of mutations. safe_core does not need to be rebuilt for this to take effect. The default value is false.

This example is not tested
mock_in_memory_storage

If true, use memory store instead of file store in mock-vault. If safe_core is built with --features=use-mock-routing, then setting this option will use mock-vault's memory store, which is faster than reading/writing to disk. safe_core does not need to be rebuilt for this to take effect. The default value is false.

This example is not tested
mock_vault_path

If this variable is set and file storage is being used (mock_in_memory_storage is false), use this as the path for mock-vault.

Re-exports

pub use ffi::arrays::*;
pub use ffi::ipc::req::*;
pub use ffi::ipc::resp::*;
pub use ffi::nfs::*;
pub use ffi::*;
pub use self::event_loop::CoreFuture;
pub use self::event_loop::CoreMsg;
pub use self::event_loop::CoreMsgRx;
pub use self::event_loop::CoreMsgTx;
pub use self::self_encryption_storage::SelfEncryptionStorage;
pub use self::self_encryption_storage::SelfEncryptionStorageError;

Modules

config_handler

Config file handling.

crypto

Cryptographic utilities. Secret encryption and signing keys with more secure cloning semantics. These keys implement implicit sharing of the underlying sensitive data to avoid multiple copies of it stored in the memory, preventing certain class of attacks.

event_loop

Event loop handling.

ffi

FFI.

immutable_data

Utilities for handling ImmutableData.

ipc

Inter-Process Communication utilities.

mdata_info

MDataInfo utilities.

nfs

NFS utilities.

recovery

Operations with recovery.

self_encryption_storage

Implements the Self Encryption storage trait.

utils

Utility functions.

Macros

btree_map
btree_set
err

This is the equivalent of Result::Ok() adapted to deal with futures. This should be used to construct the return type equivalent of Result::Err in futures paradigm.

fry

This is the equivalent try! adapted to deal with futures. It is to be read as future-try. This will convert errors from Result into a done future with corresponding error and return.

ok

This is the equivalent of Result::Ok() adapted to deal with futures. This should be used to construct the return type equivalent of Result::Ok in futures paradigm.

Structs

Client

The main self-authentication client instance that will interface all the request from high level API's to the actual routing layer and manage all interactions with it. This is essentially a non-blocking Client with an asynchronous API using the futures abstraction from the futures-rs crate

ClientKeys

Client signing and encryption keypairs

MDataInfo

Information allowing to locate and access mutable data on the network.

Enums

CoreError

Client Errors

CoreEvent

Wraps responses from routing

NetworkEvent

Network Events that Client Modules need to deal with.

Constants

DIR_TAG

MutableData type tag for a directory.

MAIDSAFE_TAG

All Maidsafe tagging should positive-offset from this.

Traits

FutureExt

Additional future combinators.

Functions

app_container_name

Gets name of the dedicated container of the given app.

Type Definitions

NetworkRx

NetworkEvent receiver stream.

NetworkTx

NetworkEvent transmitter.