# Struct ethstore::SafeAccount [−] [src]

    pub struct SafeAccount {
        pub id: [u8; 16],
        pub version: Version,
        pub address: Address,
        pub crypto: Crypto,
        pub filename: Option<String>,
        pub name: String,
        pub meta: String,
    }

## Fields

`id: [u8; 16]` `version: Version` `address: Address` `crypto: Crypto` `filename: Option<String>` `name: String` `meta: String`

## Methods

### `impl SafeAccount`
[src]

#### `fn create(keypair: &KeyPair,
id: [u8; 16],
password: &str,
iterations: u32,
name: String,
meta: String)
-> Self`

#### `fn from_file(json: KeyFile, filename: Option<String>) -> Self`

Create a new `SafeAccount` from the given `json`; if it was read from a file, the `filename` should be `Some` name. If it is as yet anonymous, then it can be left `None`.

#### `fn from_vault_file(password: &str,
json: VaultKeyFile,
filename: Option<String>)
-> Result<Self, Error>`

Create a new `SafeAccount` from the given vault `json`; if it was read from a file, the `filename` should be `Some` name. If it is as yet anonymous, then it can be left `None`.

#### `fn into_vault_file(self,
iterations: u32,
password: &str)
-> Result<VaultKeyFile, Error>`

Create a new `VaultKeyFile` from the given `self`

#### `fn sign(&self, password: &str, message: &Message) -> Result<Signature, Error>`

#### `fn decrypt(&self,
password: &str,
shared_mac: &[u8],
message: &[u8])
-> Result<Vec<u8>, Error>`

#### `fn public(&self, password: &str) -> Result<Public, Error>`

#### `fn change_password(&self,
old_password: &str,
new_password: &str,
iterations: u32)
-> Result<Self, Error>`

#### `fn check_password(&self, password: &str) -> bool`

## Trait Implementations

### `impl Debug for SafeAccount`
[src]

#### `fn fmt(&self, __arg_0: &mut Formatter) -> Result`

Formats the value using the given formatter.

### `impl PartialEq for SafeAccount`
[src]

#### `fn eq(&self, __arg_0: &SafeAccount) -> bool`

This method tests for `self` and `other` values to be equal, and is used by `==`. Read more

#### `fn ne(&self, __arg_0: &SafeAccount) -> bool`

This method tests for `!=`.

### `impl Clone for SafeAccount`
[src]

#### `fn clone(&self) -> SafeAccount`

Returns a copy of the value. Read more

#### `fn clone_from(&mut self, source: &Self)`
1.0.0

Performs copy-assignment from `source`. Read more

### `impl Into<KeyFile> for SafeAccount`
[src]

#### `fn into(self) -> KeyFile`

Performs the conversion.

# Help

## Keyboard Shortcuts

?
  Show this help dialog
S
  Focus the search field
⇤
  Move up in search results
⇥
  Move down in search results
⏎
  Go to active search result
+
  Collapse/expand all sections

## Search Tricks

Prefix searches with a type followed by a colon (e.g. `fn:`) to restrict the search to a given type.

Accepted types are: `fn`, `mod`, `struct`, `enum`, `trait`, `type`, `macro`, and `const`.

Search functions by type signature (e.g. `vec -> usize` or `* -> vec`)