#[repr(u16)]pub enum PermissionType {
Microphone = 1,
Camera = 2,
ProtectedMediaIdentifier = 3,
PersistentStorage = 4,
}
Expand description
Identifies a type of permission that may be granted to a web origin.
Variants§
Microphone = 1
Permission to access microphone(s).
Camera = 2
Permission to access camera(s).
ProtectedMediaIdentifier = 3
Permission to use device identifier(s) for EME.
PersistentStorage = 4
Permission to use persistent storage.
Implementations§
Source§impl PermissionType
impl PermissionType
pub fn from_primitive(prim: u16) -> Option<Self>
pub const fn into_primitive(self) -> u16
pub fn is_unknown(&self) -> bool
👎Deprecated: Strict enums should not use
is_unknown
Trait Implementations§
Source§impl Clone for PermissionType
impl Clone for PermissionType
Source§fn clone(&self) -> PermissionType
fn clone(&self) -> PermissionType
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for PermissionType
impl Debug for PermissionType
Source§impl<D: ResourceDialect> Decode<PermissionType, D> for PermissionType
impl<D: ResourceDialect> Decode<PermissionType, D> for PermissionType
Source§impl<D: ResourceDialect> Encode<PermissionType, D> for PermissionType
impl<D: ResourceDialect> Encode<PermissionType, D> for PermissionType
Source§impl Hash for PermissionType
impl Hash for PermissionType
Source§impl Ord for PermissionType
impl Ord for PermissionType
Source§fn cmp(&self, other: &PermissionType) -> Ordering
fn cmp(&self, other: &PermissionType) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for PermissionType
impl PartialEq for PermissionType
Source§impl PartialOrd for PermissionType
impl PartialOrd for PermissionType
Source§impl TypeMarker for PermissionType
impl TypeMarker for PermissionType
Source§type Owned = PermissionType
type Owned = PermissionType
The owned Rust type which this FIDL type decodes into.
Source§fn inline_align(_context: Context) -> usize
fn inline_align(_context: Context) -> usize
Returns the minimum required alignment of the inline portion of the
encoded object. It must be a (nonzero) power of two.
Source§fn inline_size(_context: Context) -> usize
fn inline_size(_context: Context) -> usize
Returns the size of the inline portion of the encoded object, including
padding for alignment. Must be a multiple of
inline_align
.Source§fn encode_is_copy() -> bool
fn encode_is_copy() -> bool
Returns true if the memory layout of
Self::Owned
matches the FIDL wire
format and encoding requires no validation. When true, we can optimize
encoding arrays and vectors of Self::Owned
to a single memcpy. Read moreSource§fn decode_is_copy() -> bool
fn decode_is_copy() -> bool
Returns true if the memory layout of
Self::Owned
matches the FIDL wire
format and decoding requires no validation. When true, we can optimize
decoding arrays and vectors of Self::Owned
to a single memcpy.Source§impl ValueTypeMarker for PermissionType
impl ValueTypeMarker for PermissionType
Source§type Borrowed<'a> = PermissionType
type Borrowed<'a> = PermissionType
The Rust type to use for encoding. This is a particular
Encode<Self>
type cheaply obtainable from &Self::Owned
. There are three cases: Read moreimpl Copy for PermissionType
impl Eq for PermissionType
impl StructuralPartialEq for PermissionType
Auto Trait Implementations§
impl Freeze for PermissionType
impl RefUnwindSafe for PermissionType
impl Send for PermissionType
impl Sync for PermissionType
impl Unpin for PermissionType
impl UnwindSafe for PermissionType
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)