[−][src]Struct vade::plugin::rust_storage_cache::RustStorageCache
in-memory storage
Methods
impl RustStorageCache
[src]
pub fn new() -> RustStorageCache
[src]
Creates new RustStorageCache instance
pub async fn get<'_, '_>(
&'_ self,
key: &'_ str
) -> Result<String, Box<dyn Error>>
[src]
&'_ self,
key: &'_ str
) -> Result<String, Box<dyn Error>>
pub async fn set<'_, '_, '_>(
&'_ mut self,
key: &'_ str,
value: &'_ str
) -> Result<(), Box<dyn Error>>
[src]
&'_ mut self,
key: &'_ str,
value: &'_ str
) -> Result<(), Box<dyn Error>>
Trait Implementations
impl DidResolver for RustStorageCache
[src]
fn check_did<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
did_name: &'life1 str,
_value: &'life2 str
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error>>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
did_name: &'life1 str,
_value: &'life2 str
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error>>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
Checks given DID document. A DID document is considered as valid if returning (). Resolver may throw to indicate
- that it is not responsible for this DID
- that it considers this DID as invalid
Currently the test did_name
"test"
is accepted as valid.
Arguments
did_name
- did_name to check document forvalue
- value to check
fn get_did_document<'life0, 'life1, 'async_trait>(
&'life0 self,
did_id: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<String, Box<dyn Error>>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
did_id: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<String, Box<dyn Error>>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn set_did_document<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
did_id: &'life1 str,
value: &'life2 str
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error>>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self,
did_id: &'life1 str,
value: &'life2 str
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error>>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
Sets document for given did name.
Arguments
did_name
- did_name to set value forvalue
- value to set
impl VcResolver for RustStorageCache
[src]
fn check_vc<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
vc_id: &'life1 str,
_value: &'life2 str
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error>>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
vc_id: &'life1 str,
_value: &'life2 str
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error>>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
Checks given Vc document. A Vc document is considered as valid if returning (). Resolver may throw to indicate
- that it is not responsible for this Vc
- that it considers this Vc as invalid
Currently the test vc_id
"test"
is accepted as valid.
Arguments
vc_id
- vc_id to check document forvalue
- value to check
fn get_vc_document<'life0, 'life1, 'async_trait>(
&'life0 self,
vc_name: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<String, Box<dyn Error>>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
vc_name: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<String, Box<dyn Error>>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn set_vc_document<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
vc_name: &'life1 str,
value: &'life2 str
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error>>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self,
vc_name: &'life1 str,
value: &'life2 str
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error>>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
Auto Trait Implementations
impl RefUnwindSafe for RustStorageCache
impl Send for RustStorageCache
impl Sync for RustStorageCache
impl Unpin for RustStorageCache
impl UnwindSafe for RustStorageCache
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,