Struct deno_runtime::permissions::Permissions
source · [−]pub struct Permissions {
pub read: UnaryPermission<ReadDescriptor>,
pub write: UnaryPermission<WriteDescriptor>,
pub net: UnaryPermission<NetDescriptor>,
pub env: UnaryPermission<EnvDescriptor>,
pub run: UnaryPermission<RunDescriptor>,
pub ffi: UnaryPermission<FfiDescriptor>,
pub hrtime: UnitPermission,
}
Fields
read: UnaryPermission<ReadDescriptor>
write: UnaryPermission<WriteDescriptor>
net: UnaryPermission<NetDescriptor>
env: UnaryPermission<EnvDescriptor>
run: UnaryPermission<RunDescriptor>
ffi: UnaryPermission<FfiDescriptor>
hrtime: UnitPermission
Implementations
sourceimpl Permissions
impl Permissions
pub fn new_read(
state: &Option<Vec<PathBuf>>,
prompt: bool
) -> UnaryPermission<ReadDescriptor>
pub fn new_write(
state: &Option<Vec<PathBuf>>,
prompt: bool
) -> UnaryPermission<WriteDescriptor>
pub fn new_net(
state: &Option<Vec<String>>,
prompt: bool
) -> UnaryPermission<NetDescriptor>
pub fn new_env(
state: &Option<Vec<String>>,
prompt: bool
) -> UnaryPermission<EnvDescriptor>
pub fn new_run(
state: &Option<Vec<String>>,
prompt: bool
) -> UnaryPermission<RunDescriptor>
pub fn new_ffi(
state: &Option<Vec<PathBuf>>,
prompt: bool
) -> UnaryPermission<FfiDescriptor>
pub fn new_hrtime(state: bool) -> UnitPermission
pub fn from_options(opts: &PermissionsOptions) -> Self
pub fn allow_all() -> Self
sourcepub fn check_specifier(
&mut self,
specifier: &ModuleSpecifier
) -> Result<(), AnyError>
pub fn check_specifier(
&mut self,
specifier: &ModuleSpecifier
) -> Result<(), AnyError>
A helper function that determines if the module specifier is a local or remote, and performs a read or net check for the specifier.
Trait Implementations
sourceimpl Clone for Permissions
impl Clone for Permissions
sourcefn clone(&self) -> Permissions
fn clone(&self) -> Permissions
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for Permissions
impl Debug for Permissions
sourceimpl Default for Permissions
impl Default for Permissions
sourceimpl FetchPermissions for Permissions
impl FetchPermissions for Permissions
sourceimpl FfiPermissions for Permissions
impl FfiPermissions for Permissions
sourceimpl NetPermissions for Permissions
impl NetPermissions for Permissions
sourceimpl PartialEq<Permissions> for Permissions
impl PartialEq<Permissions> for Permissions
sourcefn eq(&self, other: &Permissions) -> bool
fn eq(&self, other: &Permissions) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &Permissions) -> bool
fn ne(&self, other: &Permissions) -> bool
This method tests for !=
.
sourceimpl TimersPermission for Permissions
impl TimersPermission for Permissions
fn allow_hrtime(&mut self) -> bool
fn check_unstable(&self, state: &OpState, api_name: &'static str)
sourceimpl WebSocketPermissions for Permissions
impl WebSocketPermissions for Permissions
impl StructuralPartialEq for Permissions
Auto Trait Implementations
impl RefUnwindSafe for Permissions
impl Send for Permissions
impl Sync for Permissions
impl Unpin for Permissions
impl UnwindSafe for Permissions
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more