pub struct IdentityKeys { /* private fields */ }Expand description
The named verification-key candidates a resolver returns for an identity.
Consumers must select a candidate using a protocol-provided key identifier
or verified signer, and must never use document order to choose authority.
did:key is represented as a one-candidate set because its one-key wire
format is intentional and self-certifying.
Implementations§
Source§impl IdentityKeys
impl IdentityKeys
Sourcepub fn new(candidates: Vec<IdentityKeyCandidate>) -> Self
pub fn new(candidates: Vec<IdentityKeyCandidate>) -> Self
Construct a named candidate set.
The collection stays private so authority cannot accidentally be chosen
with .first() or an index. Callers must use a protocol selector such as
Self::candidate_for_ed25519.
Sourcepub fn len(&self) -> usize
pub fn len(&self) -> usize
Number of published candidates, for diagnostics and set-cardinality tests.
Sourcepub fn candidate_for_ed25519(
&self,
key: &Ed25519Vk,
) -> Option<&IdentityKeyCandidate>
pub fn candidate_for_ed25519( &self, key: &Ed25519Vk, ) -> Option<&IdentityKeyCandidate>
Return the named candidate whose Ed25519 key authenticated the peer.
Sourcepub fn single_ed25519(id: impl Into<String>, ed25519: Ed25519Vk) -> Self
pub fn single_ed25519(id: impl Into<String>, ed25519: Ed25519Vk) -> Self
Construct the intentional single-key did:key representation.
Trait Implementations§
Source§impl Clone for IdentityKeys
impl Clone for IdentityKeys
Source§fn clone(&self) -> IdentityKeys
fn clone(&self) -> IdentityKeys
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Default for IdentityKeys
impl Default for IdentityKeys
Source§fn default() -> IdentityKeys
fn default() -> IdentityKeys
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for IdentityKeys
impl RefUnwindSafe for IdentityKeys
impl Send for IdentityKeys
impl Sync for IdentityKeys
impl Unpin for IdentityKeys
impl UnsafeUnpin for IdentityKeys
impl UnwindSafe for IdentityKeys
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> 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 more§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