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