diff options
Diffstat (limited to 'lockchain-core/src/traits.rs')
-rw-r--r-- | lockchain-core/src/traits.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lockchain-core/src/traits.rs b/lockchain-core/src/traits.rs index efde578..13fc1b3 100644 --- a/lockchain-core/src/traits.rs +++ b/lockchain-core/src/traits.rs @@ -11,7 +11,8 @@ //! compilation work without external crates but not calling //! functions at runtime. -use initialise::Generator; +use errors::VaultError; +use init::Generator; use meta::{MetaDomain, VaultMetadata}; use record::{EncryptedBody, Header, Payload, Record}; use serde::{de::DeserializeOwned, Serialize}; @@ -123,9 +124,9 @@ where T: Body, { /// Consumes a vault generator to construct a vault - fn new(cfg: Generator) -> Self; + fn new(Generator) -> Result<Box<Self>, VaultError>; /// Load and open an existing vault - fn load(name: &str, location: &str) -> Option<Box<Self>>; + fn load(name: &str, location: &str) -> Result<Box<Self>, VaultError>; /// Unlock the vault for a specific user fn authenticate(&mut self, username: &str, secret: &str) -> Token; /// End a specific user session |