pub struct KeyAnchor { /* private fields */ }Expand description
The keys a verifier trusts out of band — the half of the trust model the chain cannot supply, because a chain signed end to end by a thief is internally perfect.
published is this build’s PUBLISHED_KEYS;
pinned is the key a client saw first and kept. Both
together is the recommendation: KeyAnchor::published().with(pinned).
Implementations§
Source§impl KeyAnchor
impl KeyAnchor
Sourcepub fn pinned(key: PublicKeyHex) -> Self
pub fn pinned(key: PublicKeyHex) -> Self
Just the one key, as a client that pinned what it saw first trusts it
Sourcepub fn with(self, key: PublicKeyHex) -> Self
pub fn with(self, key: PublicKeyHex) -> Self
This anchor, plus key
pub fn contains(&self, key: &PublicKeyHex) -> bool
pub fn is_empty(&self) -> bool
Sourcepub fn keys(&self) -> impl Iterator<Item = &PublicKeyHex>
pub fn keys(&self) -> impl Iterator<Item = &PublicKeyHex>
The anchored keys, in no particular order
Trait Implementations§
impl Eq for KeyAnchor
Source§impl FromIterator<PublicKeyHex> for KeyAnchor
impl FromIterator<PublicKeyHex> for KeyAnchor
Source§fn from_iter<I: IntoIterator<Item = PublicKeyHex>>(iter: I) -> Self
fn from_iter<I: IntoIterator<Item = PublicKeyHex>>(iter: I) -> Self
Creates a value from an iterator. Read more
impl StructuralPartialEq for KeyAnchor
Auto Trait Implementations§
impl Freeze for KeyAnchor
impl RefUnwindSafe for KeyAnchor
impl Send for KeyAnchor
impl Sync for KeyAnchor
impl Unpin for KeyAnchor
impl UnsafeUnpin for KeyAnchor
impl UnwindSafe for KeyAnchor
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