[−][src]Trait parsec_service::key_id_managers::ManageKeyIDs
Required methods
fn get(&self, key_triple: &KeyTriple) -> Result<Option<&[u8]>, String>
Returns a reference to the key ID corresponding to this key triple or None
if it does not
exist.
Errors
Returns an error as a String if there was a problem accessing the Key ID Manager.
fn get_all(&self, provider_id: ProviderID) -> Result<Vec<&KeyTriple>, String>
Returns a Vec of reference to the key triples corresponding to this provider.
Errors
Returns an error as a String if there was a problem accessing the Key ID Manager.
fn insert(
&mut self,
key_triple: KeyTriple,
key_id: Vec<u8>
) -> Result<Option<Vec<u8>>, String>
&mut self,
key_triple: KeyTriple,
key_id: Vec<u8>
) -> Result<Option<Vec<u8>>, String>
Inserts a new mapping between the key triple and the key ID. If the triple already exists,
overwrite the existing mapping and returns the old Key ID. Otherwise returns None
.
Errors
Returns an error as a String if there was a problem accessing the Key ID Manager.
fn remove(&mut self, key_triple: &KeyTriple) -> Result<Option<Vec<u8>>, String>
Removes a key triple mapping and returns it. Does nothing and returns None
if the mapping
does not exist.
Errors
Returns an error as a String if there was a problem accessing the Key ID Manager.
fn exists(&self, key_triple: &KeyTriple) -> Result<bool, String>
Check if a key triple mapping exists.
Errors
Returns an error as a String if there was a problem accessing the Key ID Manager.
Implementors
impl ManageKeyIDs for OnDiskKeyIDManager
[src]
fn get(&self, key_triple: &KeyTriple) -> Result<Option<&[u8]>, String>
[src]
fn get_all(&self, provider_id: ProviderID) -> Result<Vec<&KeyTriple>, String>
[src]
fn insert(
&mut self,
key_triple: KeyTriple,
key_id: Vec<u8>
) -> Result<Option<Vec<u8>>, String>
[src]
&mut self,
key_triple: KeyTriple,
key_id: Vec<u8>
) -> Result<Option<Vec<u8>>, String>