pub struct SnapshotObjectPrefix {
pub audience: Audience,
pub key: KeyId,
pub covers: u64,
pub purpose: Purpose,
}Expand description
Clear snapshot routing. Verify the prefix signature before using coverage.
Fields§
§audience: AudienceThe audience of its rows and header.
key: KeyIdThe audience key sealing section zero.
covers: u64Last included slot, including consumed refusals.
purpose: PurposeOrdinary snapshot or prepared admin state.
Implementations§
Source§impl SnapshotObjectPrefix
impl SnapshotObjectPrefix
Sourcepub const MAX_SIGNED_PREFIX: usize
pub const MAX_SIGNED_PREFIX: usize
Greatest signed prefix end, including a circle and raised version.
Sourcepub fn plaintext_length(&self, object_length: u64) -> Result<u64, Error>
pub fn plaintext_length(&self, object_length: u64) -> Result<u64, Error>
Plaintext size from the complete encrypted object size.
Sourcepub fn encode(&self) -> Result<Vec<u8>, Error>
pub fn encode(&self) -> Result<Vec<u8>, Error>
Encode kind, format, routing, coverage and purpose.
Sourcepub fn length(bytes: &[u8]) -> Result<usize, Error>
pub fn length(bytes: &[u8]) -> Result<usize, Error>
Determine the bounded prefix length without allocation.
Trait Implementations§
Source§impl Clone for SnapshotObjectPrefix
impl Clone for SnapshotObjectPrefix
Source§fn clone(&self) -> SnapshotObjectPrefix
fn clone(&self) -> SnapshotObjectPrefix
Returns a duplicate of the value. Read more
1.0.0 · 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 SnapshotObjectPrefix
impl Debug for SnapshotObjectPrefix
Source§impl PartialEq for SnapshotObjectPrefix
impl PartialEq for SnapshotObjectPrefix
impl Eq for SnapshotObjectPrefix
impl StructuralPartialEq for SnapshotObjectPrefix
Auto Trait Implementations§
impl Freeze for SnapshotObjectPrefix
impl RefUnwindSafe for SnapshotObjectPrefix
impl Send for SnapshotObjectPrefix
impl Sync for SnapshotObjectPrefix
impl Unpin for SnapshotObjectPrefix
impl UnsafeUnpin for SnapshotObjectPrefix
impl UnwindSafe for SnapshotObjectPrefix
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more