Struct electron_hardener::ElectronApp[][src]

pub struct ElectronApp<'a> { /* fields omitted */ }
Expand description

An Electron application binary.

Implementations

impl<'a> ElectronApp<'a>[src]

pub fn from_bytes(
    application_bytes: &'a mut [u8]
) -> Result<ElectronApp<'a>, PatcherError>
[src]

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.

pub fn get_fuse_status(&self, fuse: Fuse) -> Result<FuseStatus, PatcherError>[src]

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.

pub fn set_fuse_status(
    &mut self,
    fuse: Fuse,
    enabled: bool
) -> Result<FuseStatus, PatcherError>
[src]

Toggles a fuse in the application binary based off the provided value.

Return

Returns the result of the operation if it succeeded.

Errors

This function will return an error if a fuse wire couldn’t be found in the provided binary or if a modification of a removed fuse was attempted.

impl ElectronApp<'_>[src]

pub fn patch_option<P: Patchable>(
    &mut self,
    to_disable: P
) -> Result<(), PatcherError>
[src]

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

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

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.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

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.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.