# Struct ethcore_signer::tests::GuardedAuthCodes [−] [src]

    pub struct GuardedAuthCodes {
        pub path: RandomTempPath,
        // some fields omitted
    }

Struct representing authcodes

## Fields

`path: RandomTempPath`

The path to the mock authcodes

## Methods from Deref<Target=AuthCodes>

#### `fn to_file(&self, file: &Path) -> Result<()>`

Writes all `AuthCodes` to a disk.

#### `fn is_valid(&mut self, hash: &H256, time: u64) -> bool`

Checks if given hash is correct authcode of `SignerUI` Updates this hash last used field in case it's valid.

#### `fn generate_new(&mut self) -> Result<String>`

Generates and returns a new code that can be used by `SignerUIs`

#### `fn is_empty(&self) -> bool`

Returns true if there are no tokens in this store

#### `fn clear_garbage(&mut self)`

Removes old tokens that have not been used since creation.

## Trait Implementations

### `impl Deref for GuardedAuthCodes`
[src]

#### `type Target = AuthCodes`

The resulting type after dereferencing

#### `fn deref(&self) -> &Self::Target`

The method called to dereference a value

### `impl DerefMut for GuardedAuthCodes`
[src]

#### `fn deref_mut(&mut self) -> &mut AuthCodes`

The method called to mutably dereference a value

# 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`)