#[repr(C)]pub struct UrnaFooter {
pub footer_size: u64,
pub file_hash: [u8; 32],
}Fields§
§file_hash: [u8; 32]Implementations§
pub fn new(file_hash: [u8; 32]) -> Self
Sourcepub fn as_bytes(&self) -> &[u8] ⓘ
pub fn as_bytes(&self) -> &[u8] ⓘ
The exact on-disk bytes of this record (little-endian host only,
which is every supported target; see layout::tests).
Sourcepub fn as_bytes_mut(&mut self) -> &mut [u8] ⓘ
pub fn as_bytes_mut(&mut self) -> &mut [u8] ⓘ
Mutable view over the on-disk bytes; from_bytes-style readers copy
a slice in here. Sound for any content because every field accepts
every bit pattern (Pod).
pub fn compute_file_hash(data_without_footer: &[u8]) -> [u8; 32]
pub fn from_bytes(bytes: &[u8]) -> Result<Self>
Trait Implementations§
Auto Trait Implementations§
Blanket Implementations§
impl<T> AnyBitPattern for Twhere
T: Pod,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
Source§type Bits = T
type Bits = T
Self must have the same layout as the specified Bits except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern.Source§fn is_valid_bit_pattern(_bits: &T) -> bool
fn is_valid_bit_pattern(_bits: &T) -> bool
If this function returns true, then it must be valid to reinterpret
bits
as &Self.