Struct apple_codesign::RequirementBlob
source · [−]Expand description
Represents a Requirement blob.
csreq -b
will emit instances of this blob, header magic and all. So data generated
by csreq -b
can be fed into [RequirementBlob.from_blob_bytes] to obtain an instance.
Fields
data: Cow<'a, [u8]>
Implementations
sourceimpl<'a> RequirementBlob<'a>
impl<'a> RequirementBlob<'a>
pub fn to_owned(&self) -> RequirementBlob<'static>
sourcepub fn parse_expressions(
&self
) -> Result<CodeRequirements<'_>, AppleCodesignError>
pub fn parse_expressions(
&self
) -> Result<CodeRequirements<'_>, AppleCodesignError>
Parse the binary data in this blob into Code Requirement expressions.
Trait Implementations
sourceimpl<'a> Blob<'a> for RequirementBlob<'a>
impl<'a> Blob<'a> for RequirementBlob<'a>
sourcefn from_blob_bytes(data: &'a [u8]) -> Result<Self, AppleCodesignError>
fn from_blob_bytes(data: &'a [u8]) -> Result<Self, AppleCodesignError>
Attempt to construct an instance by parsing a bytes slice. Read more
sourcefn serialize_payload(&self) -> Result<Vec<u8>, AppleCodesignError>
fn serialize_payload(&self) -> Result<Vec<u8>, AppleCodesignError>
Serialize the payload of this blob to bytes. Read more
sourcefn to_blob_bytes(&self) -> Result<Vec<u8>, AppleCodesignError>
fn to_blob_bytes(&self) -> Result<Vec<u8>, AppleCodesignError>
Serialize this blob to bytes. Read more
sourcefn digest_with(
&self,
hash_type: DigestType
) -> Result<Vec<u8>, AppleCodesignError>
fn digest_with(
&self,
hash_type: DigestType
) -> Result<Vec<u8>, AppleCodesignError>
Obtain the digest of the blob using the specified hasher. Read more
sourceimpl<'a> Debug for RequirementBlob<'a>
impl<'a> Debug for RequirementBlob<'a>
sourceimpl<'a> TryFrom<&'_ CodeRequirements<'a>> for RequirementBlob<'static>
impl<'a> TryFrom<&'_ CodeRequirements<'a>> for RequirementBlob<'static>
type Error = AppleCodesignError
type Error = AppleCodesignError
The type returned in the event of a conversion error.
sourcefn try_from(requirements: &CodeRequirements<'a>) -> Result<Self, Self::Error>
fn try_from(requirements: &CodeRequirements<'a>) -> Result<Self, Self::Error>
Performs the conversion.
Auto Trait Implementations
impl<'a> RefUnwindSafe for RequirementBlob<'a>
impl<'a> Send for RequirementBlob<'a>
impl<'a> Sync for RequirementBlob<'a>
impl<'a> Unpin for RequirementBlob<'a>
impl<'a> UnwindSafe for RequirementBlob<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more