Struct tugger_apple_codesign::BlobEntry[][src]

pub struct BlobEntry<'a> {
    pub index: usize,
    pub slot: CodeSigningSlot,
    pub offset: usize,
    pub magic: CodeSigningMagic,
    pub length: usize,
    pub data: &'a [u8],
}

Represents a single blob as defined by a SuperBlob index entry.

Instances have copies of their own index info, including the relative order, slot type, and start offset within the SuperBlob.

The blob data is unparsed in this type. The blob payloads can be turned into ParsedBlob via .try_into().

Fields

index: usize

Our blob index within the SuperBlob.

slot: CodeSigningSlot

The slot type.

offset: usize

Our start offset within the SuperBlob.

First byte is start of our magic.

magic: CodeSigningMagic

The magic value appearing at the beginning of the blob.

length: usize

The length of the blob payload.

data: &'a [u8]

The raw data in this blob, including magic and length.

Implementations

impl<'a> BlobEntry<'a>[src]

pub fn into_parsed_blob(self) -> Result<ParsedBlob<'a>, AppleCodesignError>[src]

Attempt to convert to a ParsedBlob.

pub fn digest_with(
    &self,
    hash: DigestType
) -> Result<Vec<u8>, AppleCodesignError>
[src]

Compute the content digest of this blob using the specified hash type.

Trait Implementations

impl<'a> Clone for BlobEntry<'a>[src]

impl<'a> Debug for BlobEntry<'a>[src]

impl<'a> TryFrom<BlobEntry<'a>> for ParsedBlob<'a>[src]

type Error = AppleCodesignError

The type returned in the event of a conversion error.

Auto Trait Implementations

impl<'a> RefUnwindSafe for BlobEntry<'a>

impl<'a> Send for BlobEntry<'a>

impl<'a> Sync for BlobEntry<'a>

impl<'a> Unpin for BlobEntry<'a>

impl<'a> UnwindSafe for BlobEntry<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> SendSyncUnwindSafe for T where
    T: Send + Sync + UnwindSafe + ?Sized
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.