Struct deno_runtime::permissions::UnitPermission
source · pub struct UnitPermission {
pub name: &'static str,
pub description: &'static str,
pub state: PermissionState,
pub prompt: bool,
}
Fields§
§name: &'static str
§description: &'static str
§state: PermissionState
§prompt: bool
Implementations§
source§impl UnitPermission
impl UnitPermission
pub fn query(&self) -> PermissionState
pub fn request(&mut self) -> PermissionState
pub fn revoke(&mut self) -> PermissionState
pub fn check(&mut self) -> Result<(), AnyError>
Trait Implementations§
source§impl Clone for UnitPermission
impl Clone for UnitPermission
source§fn clone(&self) -> UnitPermission
fn clone(&self) -> UnitPermission
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 UnitPermission
impl Debug for UnitPermission
source§impl PartialEq<UnitPermission> for UnitPermission
impl PartialEq<UnitPermission> for UnitPermission
source§fn eq(&self, other: &UnitPermission) -> bool
fn eq(&self, other: &UnitPermission) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for UnitPermission
impl StructuralEq for UnitPermission
impl StructuralPartialEq for UnitPermission
Auto Trait Implementations§
impl RefUnwindSafe for UnitPermission
impl Send for UnitPermission
impl Sync for UnitPermission
impl Unpin for UnitPermission
impl UnwindSafe for UnitPermission
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere T: 'a,
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
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.