pub struct ElectronApp<'a> { /* private fields */ }Expand description
An Electron application binary.
Implementations§
Source§impl<'a> ElectronApp<'a>
impl<'a> ElectronApp<'a>
Sourcepub fn from_bytes(
application_bytes: &'a mut [u8],
) -> Result<ElectronApp<'a>, PatcherError>
pub fn from_bytes( application_bytes: &'a mut [u8], ) -> Result<ElectronApp<'a>, PatcherError>
Constructs a new electron app and verifies that the bytes came from a packaged Electron app binary file.
§Errors
This function returns an error if the bytes couldn’t be validated to contain an Electron application.
Sourcepub fn get_fuse_status(&self, fuse: Fuse) -> Result<FuseStatus, PatcherError>
pub fn get_fuse_status(&self, fuse: Fuse) -> Result<FuseStatus, PatcherError>
Parses and returns this fuse type’s status in the provided binary.
§Return
Returns the current fuse status. This will not return a modification result.
§Errors
This function will return an error if an invalid binary is provided or one that is not an Electron application.
Sourcepub fn set_fuse_status(
&mut self,
fuse: Fuse,
enabled: bool,
) -> Result<FuseStatus, PatcherError>
pub fn set_fuse_status( &mut self, fuse: Fuse, enabled: bool, ) -> Result<FuseStatus, PatcherError>
Source§impl ElectronApp<'_>
impl ElectronApp<'_>
Sourcepub fn patch_option<P: Patchable>(
&mut self,
to_disable: P,
) -> Result<(), PatcherError>
pub fn patch_option<P: Patchable>( &mut self, to_disable: P, ) -> Result<(), PatcherError>
Disables the ability to use this command line flag in the application.
After being disabled, the flag will no longer be processed by the application. The removal is a best-effort attempt. See the crate documentation on effectiveness.
Auto Trait Implementations§
impl<'a> Freeze for ElectronApp<'a>
impl<'a> RefUnwindSafe for ElectronApp<'a>
impl<'a> Send for ElectronApp<'a>
impl<'a> Sync for ElectronApp<'a>
impl<'a> Unpin for ElectronApp<'a>
impl<'a> !UnwindSafe for ElectronApp<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more