pub struct Policy {
pub harden: bool,
pub declared: Option<Capabilities>,
pub granted: Option<Capabilities>,
}Expand description
What a bundle’s code may do.
Fields§
§harden: boolRun without eval, the function constructors and writable shared
prototypes (see nsh_js::HostOptions::harden). On by default; off for
development bundles.
declared: Option<Capabilities>What the app declared (nsh.json capabilities); None: no
declaration, everything.
granted: Option<Capabilities>What the embedding app grants at most; None: whatever the app
declared.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Forget for Policy
impl Freeze for Policywhere
*const u8 is !null: Freeze,
PhantomData<String>: Freeze,
PhantomData<HostPattern>: Freeze,
PhantomData<HttpGrant>: Freeze,
PhantomData<SocketGrant>: Freeze,
PhantomData<WebMedia>: Freeze,
PhantomData<WindowKind>: Freeze,
PhantomData<WindowLevel>: Freeze,
impl Move for Policy
impl RefUnwindSafe for Policy
impl Send for Policywhere
RawVecInner: Send,
impl Sync for Policywhere
RawVecInner: Sync,
impl Unpin for Policy
impl UnsafeUnpin for Policywhere
*const u8 is !null: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
PhantomData<HostPattern>: UnsafeUnpin,
PhantomData<HttpGrant>: UnsafeUnpin,
PhantomData<SocketGrant>: UnsafeUnpin,
PhantomData<WebMedia>: UnsafeUnpin,
PhantomData<WindowKind>: UnsafeUnpin,
PhantomData<WindowLevel>: UnsafeUnpin,
impl UnwindSafe for Policywhere
RawVecInner: UnwindSafe,
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