Struct tugger_apple_codesign::CodeResourcesBuilder [−][src]
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]
&mut self,
log: &Logger,
file: &DirectoryBundleFile<'_>,
file_handler: &dyn BundleFileHandler
) -> Result<(), AppleCodesignError>
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]
&mut self,
path: &str,
info: &SignedMachOInfo
) -> Result<(), AppleCodesignError>
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]
&self,
writer: impl Write
) -> Result<(), AppleCodesignError>
Write CodeResources XML content to a writer.
Trait Implementations
impl Clone for CodeResourcesBuilder
[src]
fn clone(&self) -> CodeResourcesBuilder
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for CodeResourcesBuilder
[src]
impl Default for CodeResourcesBuilder
[src]
fn default() -> CodeResourcesBuilder
[src]
Auto Trait Implementations
impl RefUnwindSafe for CodeResourcesBuilder
impl Send for CodeResourcesBuilder
impl Sync for CodeResourcesBuilder
impl Unpin for CodeResourcesBuilder
impl UnwindSafe for CodeResourcesBuilder
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> SendSyncUnwindSafe for T where
T: Send + Sync + UnwindSafe + ?Sized,
[src]
T: Send + Sync + UnwindSafe + ?Sized,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,