pub struct KeyBindingRegistry {
pub format_version: u8,
pub epoch: u64,
pub previous_registry: Option<ContentHash>,
pub authority_signature: StateSignature,
pub bindings: Vec<KeyBinding>,
}Expand description
Versioned, authority-signed checkpoint of the key-binding registry.
Fields§
§format_version: u8§epoch: u64Monotonic checkpoint number. Genesis is epoch zero.
previous_registry: Option<ContentHash>Content hash of the immediately preceding checkpoint.
Trusted repository/identity-authority signature over this checkpoint.
bindings: Vec<KeyBinding>Implementations§
Source§impl KeyBindingRegistry
impl KeyBindingRegistry
pub const FORMAT_VERSION: u8 = 3
pub fn new( epoch: u64, previous_registry: Option<ContentHash>, authority_signature: StateSignature, bindings: Vec<KeyBinding>, ) -> Self
Sourcepub fn canonical_checkpoint_signing_payload(
&self,
) -> Result<Vec<u8>, KeyBindingError>
pub fn canonical_checkpoint_signing_payload( &self, ) -> Result<Vec<u8>, KeyBindingError>
Deterministic bytes covered by Self::authority_signature.
pub fn encode(&self) -> Result<Vec<u8>, KeyBindingError>
pub fn decode(bytes: &[u8]) -> Result<Self, KeyBindingError>
Sourcepub fn content_hash(&self) -> Result<ContentHash, KeyBindingError>
pub fn content_hash(&self) -> Result<ContentHash, KeyBindingError>
Stable address of the registry’s validated canonical encoding.
pub fn validate(&self) -> Result<(), KeyBindingError>
Trait Implementations§
Source§impl Clone for KeyBindingRegistry
impl Clone for KeyBindingRegistry
Source§fn clone(&self) -> KeyBindingRegistry
fn clone(&self) -> KeyBindingRegistry
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 Debug for KeyBindingRegistry
impl Debug for KeyBindingRegistry
Source§impl<'de> Deserialize<'de> for KeyBindingRegistry
impl<'de> Deserialize<'de> for KeyBindingRegistry
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for KeyBindingRegistry
Source§impl PartialEq for KeyBindingRegistry
impl PartialEq for KeyBindingRegistry
Source§impl Serialize for KeyBindingRegistry
impl Serialize for KeyBindingRegistry
impl StructuralPartialEq for KeyBindingRegistry
Auto Trait Implementations§
impl Freeze for KeyBindingRegistry
impl RefUnwindSafe for KeyBindingRegistry
impl Send for KeyBindingRegistry
impl Sync for KeyBindingRegistry
impl Unpin for KeyBindingRegistry
impl UnsafeUnpin for KeyBindingRegistry
impl UnwindSafe for KeyBindingRegistry
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