pub enum Keys<'a> {
Embedded,
Pinned(&'a str),
Bare(&'a [u8]),
One(&'a str, &'a [u8]),
Map(&'a BTreeMap<String, Vec<u8>>),
Resolver(&'a dyn Fn(&str) -> Option<Vec<u8>>),
}Expand description
Where an issuer’s Ed25519 key comes from.
Variants§
Embedded
No key from the caller. A did:key issuer verifies under the key
inside its DID only when a non-empty trusted-issuer set names it.
Pinned(&'a str)
No key from the caller, and the caller pins the issuer it expects (a
self-attestation): a did:key issuer equal to this DID verifies under
the key inside its DID. Any other issuer is refused.
Bare(&'a [u8])
A bare 32-byte key. Accepted only for a did:key issuer, and only when
it equals the key inside the DID.
One(&'a str, &'a [u8])
One (did, key) entry: the key is trusted for that DID only.
Map(&'a BTreeMap<String, Vec<u8>>)
A map keyed by issuer DID.
Resolver(&'a dyn Fn(&str) -> Option<Vec<u8>>)
A resolver from DID to key (None means unknown).
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for Keys<'a>
impl<'a> !Send for Keys<'a>
impl<'a> !Sync for Keys<'a>
impl<'a> !UnwindSafe for Keys<'a>
impl<'a> Forget for Keys<'a>
impl<'a> Freeze for Keys<'a>
impl<'a> Move for Keys<'a>
impl<'a> Unpin for Keys<'a>
impl<'a> UnsafeUnpin for Keys<'a>where
&'a str: UnsafeUnpin,
&'a [u8]: UnsafeUnpin,
&'a BTreeMap<String, Vec<u8>>: UnsafeUnpin,
&'a dyn Fn(&str) -> Option<Vec<u8>>: UnsafeUnpin,
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