Fuse

Enum Fuse 

Source
#[non_exhaustive]
pub enum Fuse { RunAsNode, EncryptedCookies, NodeOptions, NodeCliInspect, EmbeddedAsarIntegrityValidation, OnlyLoadAppFromAsar, }
Expand description

A representation of a fuse that Electron has built in. They are used to disable specific functionality in the application in a way that can be enforced via signature checks and codesigning at the OS level.

In the binary, fuses look like this:

| ...binary | sentinel_bytes | fuse_version | fuse_wire_length | fuse_wire | ...binary |

Refer to the Electron project’s fuse documentation for more details.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

RunAsNode

Disables ELECTRON_RUN_AS_NODE functionality in the application.

§

EncryptedCookies

Enables experimental cookie encryption support in the application.

§

NodeOptions

Disbles the ability to use the NODE_OPTIONS environment variable on the application.

§

NodeCliInspect

Disables the ability to use the [debugging command-line flags] on the application.

debugging command-line flags

§

EmbeddedAsarIntegrityValidation

Enables the integrity validation of the app.asar file when it and resources inside are loaded by Electron.

This is designed to prevent tampering with application code on supported platforms.

To use this, an Electron packaging tool must create the correct checksum and embed it into the application. Otherwise, this will have no effect on custom Electron apps.

Note: This fuse currently only affects macOS. It is a no-op on other operating systems.

§

OnlyLoadAppFromAsar

Forces Electron to only load the application from app.asar. Other files and folders will be ignored if they exist in the search path.

Trait Implementations§

Source§

impl Clone for Fuse

Source§

fn clone(&self) -> Fuse

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Fuse

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for Fuse

Source§

fn eq(&self, other: &Fuse) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for Fuse

Source§

impl Eq for Fuse

Source§

impl StructuralPartialEq for Fuse

Auto Trait Implementations§

§

impl Freeze for Fuse

§

impl RefUnwindSafe for Fuse

§

impl Send for Fuse

§

impl Sync for Fuse

§

impl Unpin for Fuse

§

impl UnwindSafe for Fuse

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.