pub struct Verifiables<Db> { /* private fields */ }Expand description
Helper to access verifiable status and data
Implementations§
Source§impl<Db> Verifiables<Db>where
Db: DbQueriesPort,
impl<Db> Verifiables<Db>where
Db: DbQueriesPort,
Sourcepub fn get(
&self,
verifiable_id: &VerifiableId,
) -> Result<Option<VerifiableWithDiffs>, Error>
pub fn get( &self, verifiable_id: &VerifiableId, ) -> Result<Option<VerifiableWithDiffs>, Error>
Get a verifiable by its ID, searching both SDL index and pending queue.
§Eventually Consistent
During transitions from pending to SDL (3 separate writes: clear pending, write proof input, write index), reads may briefly observe intermediate states where the verifiable appears not to exist.
§Parameters
verifiable_id- The ID of the verifiable to query
§Returns
Ok(Some(verifiable))- Verifiable was foundOk(None)- Verifiable was not found (not pending, not in SDL, or already finalized)Err(error)- Query failed
Sourcepub fn get_status(
&self,
verifiable_id: &VerifiableId,
) -> Result<Option<VerifiableStatus>, Error>
pub fn get_status( &self, verifiable_id: &VerifiableId, ) -> Result<Option<VerifiableStatus>, Error>
Get the status of a verifiable without loading the full data.
§Eventually Consistent
During transitions from pending to SDL (3 separate writes: clear pending, write proof input, write index), reads may briefly observe intermediate states where the verifiable appears not to exist.
§Parameters
verifiable_id- The ID of the verifiable to query
§Returns
Ok(Some(status))- Verifiable status if foundOk(None)- Verifiable was not foundErr(error)- Query failed
Trait Implementations§
Source§impl<Db: Clone> Clone for Verifiables<Db>
impl<Db: Clone> Clone for Verifiables<Db>
Source§fn clone(&self) -> Verifiables<Db>
fn clone(&self) -> Verifiables<Db>
Returns a duplicate 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<Db> Freeze for Verifiables<Db>where
Db: Freeze,
impl<Db> RefUnwindSafe for Verifiables<Db>where
Db: RefUnwindSafe,
impl<Db> Send for Verifiables<Db>where
Db: Send,
impl<Db> Sync for Verifiables<Db>where
Db: Sync,
impl<Db> Unpin for Verifiables<Db>where
Db: Unpin,
impl<Db> UnwindSafe for Verifiables<Db>where
Db: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request