#[non_exhaustive]pub struct ContainerSignature {
pub container_id: &'static str,
pub name: &'static str,
pub header_magic: &'static [u8],
pub footer_magic: &'static [u8],
pub header_offset: usize,
pub min_size: Option<usize>,
pub alignment: Option<usize>,
pub invariants: &'static [&'static str],
pub sources: &'static [&'static str],
}Expand description
How to recognize or carve a container format from raw bytes.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.container_id: &'static strContainer id this signature belongs to.
name: &'static strHuman-readable name for the signature.
header_magic: &'static [u8]Expected magic or marker bytes near the start of the structure.
Optional footer or trailer bytes when the format has a stable trailer.
header_offset: usizeByte offset where header_magic is expected.
min_size: Option<usize>Minimum plausible container size.
alignment: Option<usize>Expected alignment or page/chunk size when applicable.
invariants: &'static [&'static str]Structural validation rules beyond simple magic bytes.
sources: &'static [&'static str]Authoritative references for the signature or structure rules.
Trait Implementations§
Source§impl Clone for ContainerSignature
impl Clone for ContainerSignature
Source§fn clone(&self) -> ContainerSignature
fn clone(&self) -> ContainerSignature
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 moreimpl Copy for ContainerSignature
Source§impl Debug for ContainerSignature
impl Debug for ContainerSignature
impl Eq for ContainerSignature
Source§impl PartialEq for ContainerSignature
impl PartialEq for ContainerSignature
Source§fn eq(&self, other: &ContainerSignature) -> bool
fn eq(&self, other: &ContainerSignature) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ContainerSignature
Auto Trait Implementations§
impl Freeze for ContainerSignature
impl RefUnwindSafe for ContainerSignature
impl Send for ContainerSignature
impl Sync for ContainerSignature
impl Unpin for ContainerSignature
impl UnsafeUnpin for ContainerSignature
impl UnwindSafe for ContainerSignature
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