pub struct ValidatedHeader {
pub commit_header: CommitHeader,
pub encryption: EncryptionDescriptor,
pub extensions: Vec<DescriptorExtension>,
pub logical_header: Option<LogicalHeader>,
pub header_compressed_size: u64,
pub header_uncompressed_size: Option<u64>,
}Fields§
§commit_header: CommitHeader§encryption: EncryptionDescriptor§extensions: Vec<DescriptorExtension>§logical_header: Option<LogicalHeader>§header_compressed_size: u64§header_uncompressed_size: Option<u64>Implementations§
Source§impl ValidatedHeader
impl ValidatedHeader
pub fn validate_references( &self, available_blocks: &HashSet<u32>, ) -> Result<(), FramingError>
Sourcepub fn read_header(
reader: &mut (impl Read + Seek),
limits: CommitValidationLimits,
) -> Result<Self, FramingError>
pub fn read_header( reader: &mut (impl Read + Seek), limits: CommitValidationLimits, ) -> Result<Self, FramingError>
Read and validate only the commit header. The reader must be positioned
at the start of the header frame (i.e. at header_offset).
Sourcepub fn read_header_with_key(
reader: &mut (impl Read + Seek),
limits: CommitValidationLimits,
key: &[u8; 32],
) -> Result<Self, FramingError>
pub fn read_header_with_key( reader: &mut (impl Read + Seek), limits: CommitValidationLimits, key: &[u8; 32], ) -> Result<Self, FramingError>
Read the commit header and decrypt it when a content key is supplied.
Trait Implementations§
Source§impl Clone for ValidatedHeader
impl Clone for ValidatedHeader
Source§impl Debug for ValidatedHeader
impl Debug for ValidatedHeader
impl Eq for ValidatedHeader
Source§impl PartialEq for ValidatedHeader
impl PartialEq for ValidatedHeader
impl StructuralPartialEq for ValidatedHeader
Auto Trait Implementations§
impl Forget for ValidatedHeader
impl Freeze for ValidatedHeaderwhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<RecipientKeyWrap>: Freeze,
PhantomData<DescriptorExtension>: Freeze,
PhantomData<TocChange>: Freeze,
PhantomData<(String, MetadataType)>: Freeze,
PhantomData<EntryMetadata>: Freeze,
PhantomData<HeaderBlockIndexEntry>: Freeze,
impl Move for ValidatedHeader
impl RefUnwindSafe for ValidatedHeader
impl Send for ValidatedHeader
impl Sync for ValidatedHeader
impl Unpin for ValidatedHeader
impl UnsafeUnpin for ValidatedHeaderwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<RecipientKeyWrap>: UnsafeUnpin,
PhantomData<DescriptorExtension>: UnsafeUnpin,
PhantomData<TocChange>: UnsafeUnpin,
PhantomData<(String, MetadataType)>: UnsafeUnpin,
PhantomData<EntryMetadata>: UnsafeUnpin,
PhantomData<HeaderBlockIndexEntry>: UnsafeUnpin,
impl UnwindSafe for ValidatedHeader
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more