Enum rocket::shield::Feature[][src]

#[non_exhaustive]
pub enum Feature {
Show variants Accelerometer, AmbientLightSensor, Autoplay, Battery, Camera, CrossOriginIsolated, Displaycapture, DocumentDomain, EncryptedMedia, ExecutionWhileNotRendered, ExecutionWhileOutOfviewport, Fullscreen, Geolocation, Gyroscope, Magnetometer, Microphone, Midi, NavigationOverride, Payment, PictureInPicture, PublickeyCredentialsGet, ScreenWakeLock, SyncXhr, Usb, WebShare, XrSpatialTracking, ClipboardRead, ClipboardWrite, Gamepad, SpeakerSelection, InterestCohort, ConversionMeasurement, FocusWithoutUserActivation, Hid, IdleDetection, Serial, SyncScript, TrustTokenRedemption, VerticalScroll,
}
Expand description

A browser feature that can be enabled or blocked via Permission.

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

The “accelerometer” feature.

AmbientLightSensor

The “ambient-light-sensor” feature.

Autoplay

The “autoplay” feature.

Battery

The “battery” feature.

Camera

The “camera” feature.

CrossOriginIsolated

The “cross-origin-isolated” feature.

Displaycapture

The “display-capture” feature.

DocumentDomain

The “document-domain” feature.

EncryptedMedia

The “encrypted-media” feature.

ExecutionWhileNotRendered

The “execution-while-not-rendered” feature.

ExecutionWhileOutOfviewport

The “execution-while-out-of-viewport” feature.

Fullscreen

The “fullscreen” feature.

Geolocation

The “geolocation” feature.

Gyroscope

The “gyroscope” feature.

Magnetometer

The “magnetometer” feature.

Microphone

The “microphone” feature.

Midi

The “midi” feature.

NavigationOverride

The “navigation-override” feature.

Payment

The “payment” feature.

PictureInPicture

The “picture-in-picture” feature.

PublickeyCredentialsGet

The “publickey-credentials-get” feature.

ScreenWakeLock

The “screen-wake-lock” feature.

SyncXhr

The “sync-xhr” feature.

Usb

The “usb” feature.

WebShare

The “web-share” feature.

XrSpatialTracking

The “xr-spatial-tracking” feature.

ClipboardRead

The “clipboard-read” feature.

ClipboardWrite

The “clipboard-write” feature.

Gamepad

The “gamepad” feature.

SpeakerSelection

The “speaker-selection” feature.

InterestCohort

The “interest-cohort” feature.

ConversionMeasurement

The “conversion-measurement” feature.

FocusWithoutUserActivation

The “focus-without-user-activation” feature.

Hid

The “hid” feature.

IdleDetection

The “idle-detection” feature.

Serial

The “serial” feature.

SyncScript

The “sync-script” feature.

TrustTokenRedemption

The “trust-token-redemption” feature.

VerticalScroll

The “vertical-scroll” feature.

Implementations

Returns the feature string as it appears in the header.

Example

use rocket::shield::Feature;

assert_eq!(Feature::Camera.as_str(), "camera");
assert_eq!(Feature::SyncScript.as_str(), "sync-script");

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Compare self to key and return true if they are equal.

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

Converts self into a collection.

Should always be Self

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

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

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.