pub struct KeyAnchor { /* private fields */ }Expand description
The genesis keys a verifier trusts out of band.
Only the key the chain started under needs one: every later key is
certified by the RootSet. published is this
build’s PUBLISHED_KEYS; pinned is the key a
client saw first and kept.
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