Struct akd::directory::ReadOnlyDirectory
source · pub struct ReadOnlyDirectory<TC, S, V>(_)
where
TC: Configuration,
S: Database + Sync + Send,
V: VRFKeyStorage;
Expand description
A thin newtype which offers read-only interactivity with a Directory.
Implementations§
source§impl<TC, S, V> ReadOnlyDirectory<TC, S, V>where
TC: Configuration,
S: Database + 'static,
V: VRFKeyStorage,
impl<TC, S, V> ReadOnlyDirectory<TC, S, V>where TC: Configuration, S: Database + 'static, V: VRFKeyStorage,
sourcepub async fn new(storage: StorageManager<S>, vrf: V) -> Result<Self, AkdError>
pub async fn new(storage: StorageManager<S>, vrf: V) -> Result<Self, AkdError>
Constructs a new instance of ReadOnlyDirectory. In the event that an Azks does not exist in the storage, or we’re unable to retrieve it from storage, then a DirectoryError will be returned.
sourcepub async fn lookup(
&self,
uname: AkdLabel
) -> Result<(LookupProof, EpochHash), AkdError>
pub async fn lookup( &self, uname: AkdLabel ) -> Result<(LookupProof, EpochHash), AkdError>
Read-only access to Directory::lookup.
sourcepub async fn batch_lookup(
&self,
unames: &[AkdLabel]
) -> Result<(Vec<LookupProof>, EpochHash), AkdError>
pub async fn batch_lookup( &self, unames: &[AkdLabel] ) -> Result<(Vec<LookupProof>, EpochHash), AkdError>
Read-only access to Directory::batch_lookup.
sourcepub async fn key_history(
&self,
uname: &AkdLabel,
params: HistoryParams
) -> Result<(HistoryProof, EpochHash), AkdError>
pub async fn key_history( &self, uname: &AkdLabel, params: HistoryParams ) -> Result<(HistoryProof, EpochHash), AkdError>
Read-only access to Directory::key_history.
sourcepub async fn poll_for_azks_changes(
&self,
period: Duration,
change_detected: Option<Sender<()>>
) -> Result<(), AkdError>
pub async fn poll_for_azks_changes( &self, period: Duration, change_detected: Option<Sender<()>> ) -> Result<(), AkdError>
Read-only access to Directory::poll_for_azks_changes.
sourcepub async fn audit(
&self,
audit_start_ep: u64,
audit_end_ep: u64
) -> Result<AppendOnlyProof, AkdError>
pub async fn audit( &self, audit_start_ep: u64, audit_end_ep: u64 ) -> Result<AppendOnlyProof, AkdError>
Read-only access to Directory::audit.
sourcepub async fn get_epoch_hash(&self) -> Result<EpochHash, AkdError>
pub async fn get_epoch_hash(&self) -> Result<EpochHash, AkdError>
Read-only access to Directory::get_epoch_hash.
sourcepub async fn get_public_key(&self) -> Result<VRFPublicKey, AkdError>
pub async fn get_public_key(&self) -> Result<VRFPublicKey, AkdError>
Read-only access to Directory::get_public_key.
Trait Implementations§
source§impl<TC, S, V> Clone for ReadOnlyDirectory<TC, S, V>where
TC: Configuration + Clone,
S: Database + Sync + Send + Clone,
V: VRFKeyStorage + Clone,
impl<TC, S, V> Clone for ReadOnlyDirectory<TC, S, V>where TC: Configuration + Clone, S: Database + Sync + Send + Clone, V: VRFKeyStorage + Clone,
source§fn clone(&self) -> ReadOnlyDirectory<TC, S, V>
fn clone(&self) -> ReadOnlyDirectory<TC, S, V>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl<TC, S, V> !RefUnwindSafe for ReadOnlyDirectory<TC, S, V>
impl<TC, S, V> Send for ReadOnlyDirectory<TC, S, V>
impl<TC, S, V> Sync for ReadOnlyDirectory<TC, S, V>
impl<TC, S, V> Unpin for ReadOnlyDirectory<TC, S, V>where TC: Unpin, V: Unpin,
impl<TC, S, V> !UnwindSafe for ReadOnlyDirectory<TC, S, V>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more