pub struct ReadOnlyDirectory<TC, S, V>(/* private fields */)
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,

source

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.

source

pub async fn lookup( &self, uname: AkdLabel ) -> Result<(LookupProof, EpochHash), AkdError>

Read-only access to Directory::lookup.

source

pub async fn batch_lookup( &self, unames: &[AkdLabel] ) -> Result<(Vec<LookupProof>, EpochHash), AkdError>

Read-only access to Directory::batch_lookup.

source

pub async fn key_history( &self, uname: &AkdLabel, params: HistoryParams ) -> Result<(HistoryProof, EpochHash), AkdError>

Read-only access to Directory::key_history.

source

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.

source

pub async fn audit( &self, audit_start_ep: u64, audit_end_ep: u64 ) -> Result<AppendOnlyProof, AkdError>

Read-only access to Directory::audit.

source

pub async fn get_epoch_hash(&self) -> Result<EpochHash, AkdError>

Read-only access to Directory::get_epoch_hash.

source

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,

source§

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)

Performs copy-assignment from source. Read more

Auto 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> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.