pub struct PdsRecordResolver { /* private fields */ }Expand description
RecordResolver over a PdsRecordStore. Builds CAR proofs via the
reused hyprstream_pds::car::build_record_proof_car — no CAR/MST/commit
code is reinvented here, and no signing happens on the read path: the
commit served in the proof is the one the writer signed at publish time.
Implementations§
Source§impl PdsRecordResolver
impl PdsRecordResolver
pub fn new(store: Arc<PdsRecordStore>) -> Self
Sourcepub fn with_es256_rotation(
self,
store: Arc<Es256SigningKeyStore>,
node_did: String,
) -> Self
pub fn with_es256_rotation( self, store: Arc<Es256SigningKeyStore>, node_did: String, ) -> Self
Install the ES256 rotation store + the root did:web repo DID.
pub fn accepted_at9p_state( &self, did: &str, now: &str, ) -> AnyResult<Option<AcceptedAt9pState>>
Trait Implementations§
Source§impl RecordResolver for PdsRecordResolver
impl RecordResolver for PdsRecordResolver
Source§fn resolve_record<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
did: &'life1 str,
collection: &'life2 str,
rkey: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<Option<RecordCarData>>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn resolve_record<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
did: &'life1 str,
collection: &'life2 str,
rkey: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<Option<RecordCarData>>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Resolve a single record to a CAR proof.
collection is the NSID
(e.g. ai.hyprstream.model), rkey the TID record key. Returns
Ok(None) when the DID/collection/rkey does not name a stored record.Source§fn resolve_repo<'life0, 'life1, 'async_trait>(
&'life0 self,
did: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<RecordCarData>>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn resolve_repo<'life0, 'life1, 'async_trait>(
&'life0 self,
did: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<RecordCarData>>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Resolve a full repo CAR for a DID (commit + MST + all records).
Returns
Ok(None) when no repo is stored for the DID.Source§fn resolve_verifying_keys<'life0, 'life1, 'async_trait>(
&'life0 self,
did: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<PublishedAtprotoKeys>>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn resolve_verifying_keys<'life0, 'life1, 'async_trait>(
&'life0 self,
did: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<PublishedAtprotoKeys>>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Resolve every bounded
#atproto verification slot currently published
for did. Implementations that only know one trusted active key retain
the fail-closed default through RecordResolver::resolve_verifying_key.Source§fn resolve_verifying_key<'life0, 'life1, 'async_trait>(
&'life0 self,
_did: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<VerifyingKey<NistP256>>, Error>> + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn resolve_verifying_key<'life0, 'life1, 'async_trait>(
&'life0 self,
_did: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<VerifyingKey<NistP256>>, Error>> + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Resolve the DID’s
#atproto P-256 verifying key — the key a repo CAR’s
commit is signed by — or Ok(None) when this resolver cannot establish
one. Read moreAuto Trait Implementations§
impl Freeze for PdsRecordResolver
impl !RefUnwindSafe for PdsRecordResolver
impl Send for PdsRecordResolver
impl Sync for PdsRecordResolver
impl Unpin for PdsRecordResolver
impl UnsafeUnpin for PdsRecordResolver
impl !UnwindSafe for PdsRecordResolver
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
§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>
Converts
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>
Converts
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 moreSource§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§impl<T> JaggedSlice<T> for T
impl<T> JaggedSlice<T> for T
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T> ServiceExt for T
impl<T> ServiceExt for T
§fn map_response_body<F>(self, f: F) -> MapResponseBody<Self, F>where
Self: Sized,
fn map_response_body<F>(self, f: F) -> MapResponseBody<Self, F>where
Self: Sized,
Apply a transformation to the response body. Read more
§fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>where
Self: Sized,
fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>where
Self: Sized,
High level tracing that classifies responses using HTTP status codes. Read more
§fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>where
Self: Sized,
fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>where
Self: Sized,
High level tracing that classifies responses using gRPC headers. Read more