Trait apple_codesign::BundleFileHandler
source · [−]pub trait BundleFileHandler {
fn install_file(
&self,
log: &Logger,
file: &DirectoryBundleFile<'_>
) -> Result<(), AppleCodesignError>;
fn sign_and_install_macho(
&self,
log: &Logger,
file: &DirectoryBundleFile<'_>
) -> Result<SignedMachOInfo, AppleCodesignError>;
}
Expand description
Used to process individual files within a bundle.
This abstraction lets entities like CodeResourcesBuilder drive the installation of files into a new bundle.
Required methods
fn install_file(
&self,
log: &Logger,
file: &DirectoryBundleFile<'_>
) -> Result<(), AppleCodesignError>
fn install_file(
&self,
log: &Logger,
file: &DirectoryBundleFile<'_>
) -> Result<(), AppleCodesignError>
Ensures a file (regular or symlink) is installed.
fn sign_and_install_macho(
&self,
log: &Logger,
file: &DirectoryBundleFile<'_>
) -> Result<SignedMachOInfo, AppleCodesignError>
fn sign_and_install_macho(
&self,
log: &Logger,
file: &DirectoryBundleFile<'_>
) -> Result<SignedMachOInfo, AppleCodesignError>
Sign a Mach-O file and ensure its new content is installed.
Returns Mach-O metadata which will be recorded in crate::code_resources::CodeResources.