Struct tugger_apple_codesign::CodeResourcesBuilder[][src]

pub struct CodeResourcesBuilder { /* fields omitted */ }

Interface for constructing a CodeResources instance.

This type is used during bundle signing to construct a CodeResources instance. It contains logic for validating a file against registered processing rules and handling it accordingly.

Implementations

impl CodeResourcesBuilder[src]

pub fn default_resources_rules() -> Result<Self, AppleCodesignError>[src]

Obtain an instance with default rules for a bundle with a Resources/ directory.

pub fn default_no_resources_rules() -> Result<Self, AppleCodesignError>[src]

Obtain an instance with default rules for a bundle without a Resources/ directory.

pub fn add_rule(&mut self, rule: CodeResourcesRule)[src]

Add a rule to this instance in the <rules> section.

pub fn add_rule2(&mut self, rule: CodeResourcesRule)[src]

Add a rule to this instance in the <rules2> section.

pub fn add_exclusion_rule(&mut self, rule: CodeResourcesRule)[src]

Add an exclusion rule to the processing rules.

Exclusion rules are not added to the CodeResources because they are for building only.

pub fn process_file(
    &mut self,
    log: &Logger,
    file: &DirectoryBundleFile<'_>,
    file_handler: &dyn BundleFileHandler
) -> Result<(), AppleCodesignError>
[src]

Process a file for resource handling.

This determines whether a file is relevant for inclusion in the CodeResources file and takes actions to process it, if necessary.

pub fn add_signed_macho_file(
    &mut self,
    path: &str,
    info: &SignedMachOInfo
) -> Result<(), AppleCodesignError>
[src]

Add metadata for an additional signed Mach-O file.

This is likely used to register the metadata of a nested bundle. The metadata likely comes from the first Mach-O binary in the nested bundle’s main executable.

pub fn write_code_resources(
    &self,
    writer: impl Write
) -> Result<(), AppleCodesignError>
[src]

Write CodeResources XML content to a writer.

Trait Implementations

impl Clone for CodeResourcesBuilder[src]

impl Debug for CodeResourcesBuilder[src]

impl Default for CodeResourcesBuilder[src]

Auto Trait Implementations

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> 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.