pub struct Store;Expand description
Owns no pool or fallback authority. A dedicated connection is borrowed per operation; caller cancellation drops/rolls back the transaction. Commit errors (including ambiguous commit outcome) never return a usable admission receipt.
Implementations§
Source§impl Store
impl Store
pub async fn admit( client: &mut Client, admission: &Admission, ) -> Result<Session, Error>
Sourcepub async fn active(client: &Client, expected: &Session) -> Result<bool, Error>
pub async fn active(client: &Client, expected: &Session) -> Result<bool, Error>
Resolve by issuer/sid and compare the complete expected credential binding. No positive cache and no static-primary fallback. SQL/schema errors deny.
Sourcepub async fn lookup(
client: &(impl GenericClient + Sync),
host: &str,
sid: &str,
generation: &[u8; 32],
local_collision_inventory_id: &[u8; 32],
) -> Result<Option<Session>, Error>
pub async fn lookup( client: &(impl GenericClient + Sync), host: &str, sid: &str, generation: &[u8; 32], local_collision_inventory_id: &[u8; 32], ) -> Result<Option<Session>, Error>
Authoritative full-record lookup for the future request-local proof resolver. The session must have its own matching, verified source-DID replay record and immutable identity binding. Caller must still compare all credential fields and verify the RPC proof.
Sourcepub async fn lookup_primary(
client: &mut Client,
host: &str,
sid: &str,
generation: &[u8; 32],
local_collision_inventory_id: &[u8; 32],
) -> Result<Option<PrimaryRecord>, Error>
pub async fn lookup_primary( client: &mut Client, host: &str, sid: &str, generation: &[u8; 32], local_collision_inventory_id: &[u8; 32], ) -> Result<Option<PrimaryRecord>, Error>
Resolve the exact active session and its unique, committed source identity in one query. A session without exactly one matching replay row fails closed; callers still bind the full record to verified host JWT claims and holder proof before dispatch.
Sourcepub async fn consume_request_replay(
client: &mut Client,
expected: &Session,
verified_namespace: &[u8; 32],
request_id: &[u8; 16],
configured_clock_skew_secs: i64,
) -> Result<(), Error>
pub async fn consume_request_replay( client: &mut Client, expected: &Session, verified_namespace: &[u8; 32], request_id: &[u8; 16], configured_clock_skew_secs: i64, ) -> Result<(), Error>
Atomically consumes an already-verified v16 (namespace, request_id)
against the current exact session. The caller must derive namespace
from the verified suite, ordered public components and stored epoch;
this store neither parses proofs nor offers a runtime verifier factory.
Unknown commit outcomes deny; no local-cache fallback is possible.
pub async fn revoke( client: &Client, host: &str, sid: &str, generation: &[u8; 32], ) -> Result<bool, Error>
Auto Trait Implementations§
impl Freeze for Store
impl RefUnwindSafe for Store
impl Send for Store
impl Sync for Store
impl Unpin for Store
impl UnsafeUnpin for Store
impl UnwindSafe for Store
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
§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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more