pub struct FsVerityDescriptor<'a> { /* private fields */ }Expand description
A descriptor struct for fsverity backed by a pointer slice. It does not own the bytes backing it.
Implementations§
Source§impl<'a> FsVerityDescriptor<'a>
impl<'a> FsVerityDescriptor<'a>
Sourcepub fn new(
bytes: impl Into<PtrByteSlice<'a>>,
block_size: usize,
) -> Result<Self, Error>
pub fn new( bytes: impl Into<PtrByteSlice<'a>>, block_size: usize, ) -> Result<Self, Error>
Create a descriptor from data that can be converted into a pointer slice.
pub fn digest_len(&self) -> usize
pub fn digest_algorithm(&self) -> HashAlgorithm
pub fn block_size(&self) -> usize
pub fn file_size(&self) -> usize
pub fn root_digest(&self) -> &[u8] ⓘ
pub fn salt(&self) -> &[u8] ⓘ
Sourcepub fn hasher(&self) -> FsVerityHasher
pub fn hasher(&self) -> FsVerityHasher
Return a hasher configured based on this descriptor.
Trait Implementations§
Source§impl<'a> Clone for FsVerityDescriptor<'a>
impl<'a> Clone for FsVerityDescriptor<'a>
Source§fn clone(&self) -> FsVerityDescriptor<'a>
fn clone(&self) -> FsVerityDescriptor<'a>
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 moreAuto Trait Implementations§
impl<'a> Freeze for FsVerityDescriptor<'a>
impl<'a> RefUnwindSafe for FsVerityDescriptor<'a>
impl<'a> Send for FsVerityDescriptor<'a>
impl<'a> Sync for FsVerityDescriptor<'a>
impl<'a> Unpin for FsVerityDescriptor<'a>
impl<'a> UnsafeUnpin for FsVerityDescriptor<'a>
impl<'a> UnwindSafe for FsVerityDescriptor<'a>
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