Skip to main content

Cap

Struct Cap 

Source
pub struct Cap<P: Permission> { /* private fields */ }
Expand description

A zero-sized capability token proving the holder has permission P.

Cannot be constructed outside of capsec-core — only CapRoot::grant can create one. !Send and !Sync by default to scope capabilities to the granting thread.

§Example

let root = test_root();
let cap = root.grant::<FsRead>();
// cap is a proof token — zero bytes at runtime
assert_eq!(std::mem::size_of_val(&cap), 0);

Implementations§

Source§

impl<P: Permission> Cap<P>

Source

pub fn attenuate<S: Scope>(self, scope: S) -> Attenuated<P, S>

Narrows this capability to a specific scope.

Consumes the original Cap<P> and returns an Attenuated<P, S> that can only act on targets within the scope.

Source§

impl<P: Permission> Cap<P>

Source

pub fn make_send(self) -> SendCap<P>

Converts this capability into a SendCap that can cross thread boundaries.

This is an explicit opt-in — you’re acknowledging that this capability will be used in a multi-threaded context (e.g., passed into tokio::spawn).

Trait Implementations§

Source§

impl<P: Permission> Clone for Cap<P>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Has<Ambient> for Cap<(Ambient, Ambient)>

Source§

fn cap_ref(&self) -> Cap<Ambient>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<Ambient> for Cap<(Ambient, EnvRead)>

Source§

fn cap_ref(&self) -> Cap<Ambient>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<Ambient> for Cap<(Ambient, EnvWrite)>

Source§

fn cap_ref(&self) -> Cap<Ambient>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<Ambient> for Cap<(Ambient, FsAll)>

Source§

fn cap_ref(&self) -> Cap<Ambient>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<Ambient> for Cap<(Ambient, FsRead)>

Source§

fn cap_ref(&self) -> Cap<Ambient>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<Ambient> for Cap<(Ambient, FsWrite)>

Source§

fn cap_ref(&self) -> Cap<Ambient>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<Ambient> for Cap<(Ambient, NetAll)>

Source§

fn cap_ref(&self) -> Cap<Ambient>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<Ambient> for Cap<(Ambient, NetBind)>

Source§

fn cap_ref(&self) -> Cap<Ambient>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<Ambient> for Cap<(Ambient, NetConnect)>

Source§

fn cap_ref(&self) -> Cap<Ambient>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<Ambient> for Cap<(Ambient, Spawn)>

Source§

fn cap_ref(&self) -> Cap<Ambient>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<Ambient> for Cap<(EnvRead, Ambient)>

Source§

fn cap_ref(&self) -> Cap<Ambient>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<Ambient> for Cap<(EnvWrite, Ambient)>

Source§

fn cap_ref(&self) -> Cap<Ambient>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<Ambient> for Cap<(FsAll, Ambient)>

Source§

fn cap_ref(&self) -> Cap<Ambient>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<Ambient> for Cap<(FsRead, Ambient)>

Source§

fn cap_ref(&self) -> Cap<Ambient>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<Ambient> for Cap<(FsWrite, Ambient)>

Source§

fn cap_ref(&self) -> Cap<Ambient>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<Ambient> for Cap<(NetAll, Ambient)>

Source§

fn cap_ref(&self) -> Cap<Ambient>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<Ambient> for Cap<(NetBind, Ambient)>

Source§

fn cap_ref(&self) -> Cap<Ambient>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<Ambient> for Cap<(NetConnect, Ambient)>

Source§

fn cap_ref(&self) -> Cap<Ambient>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<Ambient> for Cap<(Spawn, Ambient)>

Source§

fn cap_ref(&self) -> Cap<Ambient>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<EnvRead> for Cap<(Ambient, EnvRead)>

Source§

fn cap_ref(&self) -> Cap<EnvRead>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<EnvRead> for Cap<(EnvRead, Ambient)>

Source§

fn cap_ref(&self) -> Cap<EnvRead>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<EnvRead> for Cap<(EnvRead, EnvRead)>

Source§

fn cap_ref(&self) -> Cap<EnvRead>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<EnvRead> for Cap<(EnvRead, EnvWrite)>

Source§

fn cap_ref(&self) -> Cap<EnvRead>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<EnvRead> for Cap<(EnvRead, FsAll)>

Source§

fn cap_ref(&self) -> Cap<EnvRead>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<EnvRead> for Cap<(EnvRead, FsRead)>

Source§

fn cap_ref(&self) -> Cap<EnvRead>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<EnvRead> for Cap<(EnvRead, FsWrite)>

Source§

fn cap_ref(&self) -> Cap<EnvRead>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<EnvRead> for Cap<(EnvRead, NetAll)>

Source§

fn cap_ref(&self) -> Cap<EnvRead>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<EnvRead> for Cap<(EnvRead, NetBind)>

Source§

fn cap_ref(&self) -> Cap<EnvRead>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<EnvRead> for Cap<(EnvRead, NetConnect)>

Source§

fn cap_ref(&self) -> Cap<EnvRead>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<EnvRead> for Cap<(EnvRead, Spawn)>

Source§

fn cap_ref(&self) -> Cap<EnvRead>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<EnvRead> for Cap<(EnvWrite, EnvRead)>

Source§

fn cap_ref(&self) -> Cap<EnvRead>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<EnvRead> for Cap<(FsAll, EnvRead)>

Source§

fn cap_ref(&self) -> Cap<EnvRead>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<EnvRead> for Cap<(FsRead, EnvRead)>

Source§

fn cap_ref(&self) -> Cap<EnvRead>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<EnvRead> for Cap<(FsWrite, EnvRead)>

Source§

fn cap_ref(&self) -> Cap<EnvRead>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<EnvRead> for Cap<(NetAll, EnvRead)>

Source§

fn cap_ref(&self) -> Cap<EnvRead>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<EnvRead> for Cap<(NetBind, EnvRead)>

Source§

fn cap_ref(&self) -> Cap<EnvRead>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<EnvRead> for Cap<(NetConnect, EnvRead)>

Source§

fn cap_ref(&self) -> Cap<EnvRead>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<EnvRead> for Cap<(Spawn, EnvRead)>

Source§

fn cap_ref(&self) -> Cap<EnvRead>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<EnvRead> for Cap<Ambient>

Source§

fn cap_ref(&self) -> Cap<EnvRead>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<EnvWrite> for Cap<(Ambient, EnvWrite)>

Source§

fn cap_ref(&self) -> Cap<EnvWrite>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<EnvWrite> for Cap<(EnvRead, EnvWrite)>

Source§

fn cap_ref(&self) -> Cap<EnvWrite>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<EnvWrite> for Cap<(EnvWrite, Ambient)>

Source§

fn cap_ref(&self) -> Cap<EnvWrite>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<EnvWrite> for Cap<(EnvWrite, EnvRead)>

Source§

fn cap_ref(&self) -> Cap<EnvWrite>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<EnvWrite> for Cap<(EnvWrite, EnvWrite)>

Source§

fn cap_ref(&self) -> Cap<EnvWrite>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<EnvWrite> for Cap<(EnvWrite, FsAll)>

Source§

fn cap_ref(&self) -> Cap<EnvWrite>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<EnvWrite> for Cap<(EnvWrite, FsRead)>

Source§

fn cap_ref(&self) -> Cap<EnvWrite>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<EnvWrite> for Cap<(EnvWrite, FsWrite)>

Source§

fn cap_ref(&self) -> Cap<EnvWrite>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<EnvWrite> for Cap<(EnvWrite, NetAll)>

Source§

fn cap_ref(&self) -> Cap<EnvWrite>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<EnvWrite> for Cap<(EnvWrite, NetBind)>

Source§

fn cap_ref(&self) -> Cap<EnvWrite>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<EnvWrite> for Cap<(EnvWrite, NetConnect)>

Source§

fn cap_ref(&self) -> Cap<EnvWrite>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<EnvWrite> for Cap<(EnvWrite, Spawn)>

Source§

fn cap_ref(&self) -> Cap<EnvWrite>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<EnvWrite> for Cap<(FsAll, EnvWrite)>

Source§

fn cap_ref(&self) -> Cap<EnvWrite>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<EnvWrite> for Cap<(FsRead, EnvWrite)>

Source§

fn cap_ref(&self) -> Cap<EnvWrite>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<EnvWrite> for Cap<(FsWrite, EnvWrite)>

Source§

fn cap_ref(&self) -> Cap<EnvWrite>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<EnvWrite> for Cap<(NetAll, EnvWrite)>

Source§

fn cap_ref(&self) -> Cap<EnvWrite>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<EnvWrite> for Cap<(NetBind, EnvWrite)>

Source§

fn cap_ref(&self) -> Cap<EnvWrite>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<EnvWrite> for Cap<(NetConnect, EnvWrite)>

Source§

fn cap_ref(&self) -> Cap<EnvWrite>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<EnvWrite> for Cap<(Spawn, EnvWrite)>

Source§

fn cap_ref(&self) -> Cap<EnvWrite>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<EnvWrite> for Cap<Ambient>

Source§

fn cap_ref(&self) -> Cap<EnvWrite>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<FsAll> for Cap<(Ambient, FsAll)>

Source§

fn cap_ref(&self) -> Cap<FsAll>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<FsAll> for Cap<(EnvRead, FsAll)>

Source§

fn cap_ref(&self) -> Cap<FsAll>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<FsAll> for Cap<(EnvWrite, FsAll)>

Source§

fn cap_ref(&self) -> Cap<FsAll>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<FsAll> for Cap<(FsAll, Ambient)>

Source§

fn cap_ref(&self) -> Cap<FsAll>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<FsAll> for Cap<(FsAll, EnvRead)>

Source§

fn cap_ref(&self) -> Cap<FsAll>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<FsAll> for Cap<(FsAll, EnvWrite)>

Source§

fn cap_ref(&self) -> Cap<FsAll>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<FsAll> for Cap<(FsAll, FsAll)>

Source§

fn cap_ref(&self) -> Cap<FsAll>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<FsAll> for Cap<(FsAll, FsRead)>

Source§

fn cap_ref(&self) -> Cap<FsAll>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<FsAll> for Cap<(FsAll, FsWrite)>

Source§

fn cap_ref(&self) -> Cap<FsAll>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<FsAll> for Cap<(FsAll, NetAll)>

Source§

fn cap_ref(&self) -> Cap<FsAll>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<FsAll> for Cap<(FsAll, NetBind)>

Source§

fn cap_ref(&self) -> Cap<FsAll>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<FsAll> for Cap<(FsAll, NetConnect)>

Source§

fn cap_ref(&self) -> Cap<FsAll>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<FsAll> for Cap<(FsAll, Spawn)>

Source§

fn cap_ref(&self) -> Cap<FsAll>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<FsAll> for Cap<(FsRead, FsAll)>

Source§

fn cap_ref(&self) -> Cap<FsAll>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<FsAll> for Cap<(FsWrite, FsAll)>

Source§

fn cap_ref(&self) -> Cap<FsAll>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<FsAll> for Cap<(NetAll, FsAll)>

Source§

fn cap_ref(&self) -> Cap<FsAll>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<FsAll> for Cap<(NetBind, FsAll)>

Source§

fn cap_ref(&self) -> Cap<FsAll>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<FsAll> for Cap<(NetConnect, FsAll)>

Source§

fn cap_ref(&self) -> Cap<FsAll>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<FsAll> for Cap<(Spawn, FsAll)>

Source§

fn cap_ref(&self) -> Cap<FsAll>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<FsAll> for Cap<Ambient>

Source§

fn cap_ref(&self) -> Cap<FsAll>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<FsRead> for Cap<(Ambient, FsRead)>

Source§

fn cap_ref(&self) -> Cap<FsRead>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<FsRead> for Cap<(EnvRead, FsRead)>

Source§

fn cap_ref(&self) -> Cap<FsRead>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<FsRead> for Cap<(EnvWrite, FsRead)>

Source§

fn cap_ref(&self) -> Cap<FsRead>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<FsRead> for Cap<(FsAll, FsRead)>

Source§

fn cap_ref(&self) -> Cap<FsRead>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<FsRead> for Cap<(FsRead, Ambient)>

Source§

fn cap_ref(&self) -> Cap<FsRead>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<FsRead> for Cap<(FsRead, EnvRead)>

Source§

fn cap_ref(&self) -> Cap<FsRead>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<FsRead> for Cap<(FsRead, EnvWrite)>

Source§

fn cap_ref(&self) -> Cap<FsRead>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<FsRead> for Cap<(FsRead, FsAll)>

Source§

fn cap_ref(&self) -> Cap<FsRead>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<FsRead> for Cap<(FsRead, FsRead)>

Source§

fn cap_ref(&self) -> Cap<FsRead>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<FsRead> for Cap<(FsRead, FsWrite)>

Source§

fn cap_ref(&self) -> Cap<FsRead>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<FsRead> for Cap<(FsRead, NetAll)>

Source§

fn cap_ref(&self) -> Cap<FsRead>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<FsRead> for Cap<(FsRead, NetBind)>

Source§

fn cap_ref(&self) -> Cap<FsRead>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<FsRead> for Cap<(FsRead, NetConnect)>

Source§

fn cap_ref(&self) -> Cap<FsRead>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<FsRead> for Cap<(FsRead, Spawn)>

Source§

fn cap_ref(&self) -> Cap<FsRead>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<FsRead> for Cap<(FsWrite, FsRead)>

Source§

fn cap_ref(&self) -> Cap<FsRead>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<FsRead> for Cap<(NetAll, FsRead)>

Source§

fn cap_ref(&self) -> Cap<FsRead>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<FsRead> for Cap<(NetBind, FsRead)>

Source§

fn cap_ref(&self) -> Cap<FsRead>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<FsRead> for Cap<(NetConnect, FsRead)>

Source§

fn cap_ref(&self) -> Cap<FsRead>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<FsRead> for Cap<(Spawn, FsRead)>

Source§

fn cap_ref(&self) -> Cap<FsRead>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<FsRead> for Cap<Ambient>

Source§

fn cap_ref(&self) -> Cap<FsRead>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<FsRead> for Cap<FsAll>

Source§

fn cap_ref(&self) -> Cap<FsRead>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<FsWrite> for Cap<(Ambient, FsWrite)>

Source§

fn cap_ref(&self) -> Cap<FsWrite>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<FsWrite> for Cap<(EnvRead, FsWrite)>

Source§

fn cap_ref(&self) -> Cap<FsWrite>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<FsWrite> for Cap<(EnvWrite, FsWrite)>

Source§

fn cap_ref(&self) -> Cap<FsWrite>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<FsWrite> for Cap<(FsAll, FsWrite)>

Source§

fn cap_ref(&self) -> Cap<FsWrite>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<FsWrite> for Cap<(FsRead, FsWrite)>

Source§

fn cap_ref(&self) -> Cap<FsWrite>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<FsWrite> for Cap<(FsWrite, Ambient)>

Source§

fn cap_ref(&self) -> Cap<FsWrite>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<FsWrite> for Cap<(FsWrite, EnvRead)>

Source§

fn cap_ref(&self) -> Cap<FsWrite>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<FsWrite> for Cap<(FsWrite, EnvWrite)>

Source§

fn cap_ref(&self) -> Cap<FsWrite>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<FsWrite> for Cap<(FsWrite, FsAll)>

Source§

fn cap_ref(&self) -> Cap<FsWrite>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<FsWrite> for Cap<(FsWrite, FsRead)>

Source§

fn cap_ref(&self) -> Cap<FsWrite>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<FsWrite> for Cap<(FsWrite, FsWrite)>

Source§

fn cap_ref(&self) -> Cap<FsWrite>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<FsWrite> for Cap<(FsWrite, NetAll)>

Source§

fn cap_ref(&self) -> Cap<FsWrite>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<FsWrite> for Cap<(FsWrite, NetBind)>

Source§

fn cap_ref(&self) -> Cap<FsWrite>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<FsWrite> for Cap<(FsWrite, NetConnect)>

Source§

fn cap_ref(&self) -> Cap<FsWrite>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<FsWrite> for Cap<(FsWrite, Spawn)>

Source§

fn cap_ref(&self) -> Cap<FsWrite>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<FsWrite> for Cap<(NetAll, FsWrite)>

Source§

fn cap_ref(&self) -> Cap<FsWrite>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<FsWrite> for Cap<(NetBind, FsWrite)>

Source§

fn cap_ref(&self) -> Cap<FsWrite>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<FsWrite> for Cap<(NetConnect, FsWrite)>

Source§

fn cap_ref(&self) -> Cap<FsWrite>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<FsWrite> for Cap<(Spawn, FsWrite)>

Source§

fn cap_ref(&self) -> Cap<FsWrite>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<FsWrite> for Cap<Ambient>

Source§

fn cap_ref(&self) -> Cap<FsWrite>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<FsWrite> for Cap<FsAll>

Source§

fn cap_ref(&self) -> Cap<FsWrite>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<NetAll> for Cap<(Ambient, NetAll)>

Source§

fn cap_ref(&self) -> Cap<NetAll>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<NetAll> for Cap<(EnvRead, NetAll)>

Source§

fn cap_ref(&self) -> Cap<NetAll>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<NetAll> for Cap<(EnvWrite, NetAll)>

Source§

fn cap_ref(&self) -> Cap<NetAll>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<NetAll> for Cap<(FsAll, NetAll)>

Source§

fn cap_ref(&self) -> Cap<NetAll>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<NetAll> for Cap<(FsRead, NetAll)>

Source§

fn cap_ref(&self) -> Cap<NetAll>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<NetAll> for Cap<(FsWrite, NetAll)>

Source§

fn cap_ref(&self) -> Cap<NetAll>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<NetAll> for Cap<(NetAll, Ambient)>

Source§

fn cap_ref(&self) -> Cap<NetAll>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<NetAll> for Cap<(NetAll, EnvRead)>

Source§

fn cap_ref(&self) -> Cap<NetAll>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<NetAll> for Cap<(NetAll, EnvWrite)>

Source§

fn cap_ref(&self) -> Cap<NetAll>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<NetAll> for Cap<(NetAll, FsAll)>

Source§

fn cap_ref(&self) -> Cap<NetAll>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<NetAll> for Cap<(NetAll, FsRead)>

Source§

fn cap_ref(&self) -> Cap<NetAll>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<NetAll> for Cap<(NetAll, FsWrite)>

Source§

fn cap_ref(&self) -> Cap<NetAll>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<NetAll> for Cap<(NetAll, NetAll)>

Source§

fn cap_ref(&self) -> Cap<NetAll>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<NetAll> for Cap<(NetAll, NetBind)>

Source§

fn cap_ref(&self) -> Cap<NetAll>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<NetAll> for Cap<(NetAll, NetConnect)>

Source§

fn cap_ref(&self) -> Cap<NetAll>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<NetAll> for Cap<(NetAll, Spawn)>

Source§

fn cap_ref(&self) -> Cap<NetAll>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<NetAll> for Cap<(NetBind, NetAll)>

Source§

fn cap_ref(&self) -> Cap<NetAll>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<NetAll> for Cap<(NetConnect, NetAll)>

Source§

fn cap_ref(&self) -> Cap<NetAll>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<NetAll> for Cap<(Spawn, NetAll)>

Source§

fn cap_ref(&self) -> Cap<NetAll>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<NetAll> for Cap<Ambient>

Source§

fn cap_ref(&self) -> Cap<NetAll>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<NetBind> for Cap<(Ambient, NetBind)>

Source§

fn cap_ref(&self) -> Cap<NetBind>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<NetBind> for Cap<(EnvRead, NetBind)>

Source§

fn cap_ref(&self) -> Cap<NetBind>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<NetBind> for Cap<(EnvWrite, NetBind)>

Source§

fn cap_ref(&self) -> Cap<NetBind>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<NetBind> for Cap<(FsAll, NetBind)>

Source§

fn cap_ref(&self) -> Cap<NetBind>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<NetBind> for Cap<(FsRead, NetBind)>

Source§

fn cap_ref(&self) -> Cap<NetBind>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<NetBind> for Cap<(FsWrite, NetBind)>

Source§

fn cap_ref(&self) -> Cap<NetBind>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<NetBind> for Cap<(NetAll, NetBind)>

Source§

fn cap_ref(&self) -> Cap<NetBind>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<NetBind> for Cap<(NetBind, Ambient)>

Source§

fn cap_ref(&self) -> Cap<NetBind>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<NetBind> for Cap<(NetBind, EnvRead)>

Source§

fn cap_ref(&self) -> Cap<NetBind>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<NetBind> for Cap<(NetBind, EnvWrite)>

Source§

fn cap_ref(&self) -> Cap<NetBind>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<NetBind> for Cap<(NetBind, FsAll)>

Source§

fn cap_ref(&self) -> Cap<NetBind>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<NetBind> for Cap<(NetBind, FsRead)>

Source§

fn cap_ref(&self) -> Cap<NetBind>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<NetBind> for Cap<(NetBind, FsWrite)>

Source§

fn cap_ref(&self) -> Cap<NetBind>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<NetBind> for Cap<(NetBind, NetAll)>

Source§

fn cap_ref(&self) -> Cap<NetBind>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<NetBind> for Cap<(NetBind, NetBind)>

Source§

fn cap_ref(&self) -> Cap<NetBind>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<NetBind> for Cap<(NetBind, NetConnect)>

Source§

fn cap_ref(&self) -> Cap<NetBind>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<NetBind> for Cap<(NetBind, Spawn)>

Source§

fn cap_ref(&self) -> Cap<NetBind>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<NetBind> for Cap<(NetConnect, NetBind)>

Source§

fn cap_ref(&self) -> Cap<NetBind>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<NetBind> for Cap<(Spawn, NetBind)>

Source§

fn cap_ref(&self) -> Cap<NetBind>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<NetBind> for Cap<Ambient>

Source§

fn cap_ref(&self) -> Cap<NetBind>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<NetBind> for Cap<NetAll>

Source§

fn cap_ref(&self) -> Cap<NetBind>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<NetConnect> for Cap<(Ambient, NetConnect)>

Source§

fn cap_ref(&self) -> Cap<NetConnect>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<NetConnect> for Cap<(EnvRead, NetConnect)>

Source§

fn cap_ref(&self) -> Cap<NetConnect>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<NetConnect> for Cap<(EnvWrite, NetConnect)>

Source§

fn cap_ref(&self) -> Cap<NetConnect>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<NetConnect> for Cap<(FsAll, NetConnect)>

Source§

fn cap_ref(&self) -> Cap<NetConnect>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<NetConnect> for Cap<(FsRead, NetConnect)>

Source§

fn cap_ref(&self) -> Cap<NetConnect>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<NetConnect> for Cap<(FsWrite, NetConnect)>

Source§

fn cap_ref(&self) -> Cap<NetConnect>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<NetConnect> for Cap<(NetAll, NetConnect)>

Source§

fn cap_ref(&self) -> Cap<NetConnect>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<NetConnect> for Cap<(NetBind, NetConnect)>

Source§

fn cap_ref(&self) -> Cap<NetConnect>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<NetConnect> for Cap<(NetConnect, Ambient)>

Source§

fn cap_ref(&self) -> Cap<NetConnect>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<NetConnect> for Cap<(NetConnect, EnvRead)>

Source§

fn cap_ref(&self) -> Cap<NetConnect>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<NetConnect> for Cap<(NetConnect, EnvWrite)>

Source§

fn cap_ref(&self) -> Cap<NetConnect>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<NetConnect> for Cap<(NetConnect, FsAll)>

Source§

fn cap_ref(&self) -> Cap<NetConnect>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<NetConnect> for Cap<(NetConnect, FsRead)>

Source§

fn cap_ref(&self) -> Cap<NetConnect>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<NetConnect> for Cap<(NetConnect, FsWrite)>

Source§

fn cap_ref(&self) -> Cap<NetConnect>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<NetConnect> for Cap<(NetConnect, NetAll)>

Source§

fn cap_ref(&self) -> Cap<NetConnect>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<NetConnect> for Cap<(NetConnect, NetBind)>

Source§

fn cap_ref(&self) -> Cap<NetConnect>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<NetConnect> for Cap<(NetConnect, NetConnect)>

Source§

fn cap_ref(&self) -> Cap<NetConnect>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<NetConnect> for Cap<(NetConnect, Spawn)>

Source§

fn cap_ref(&self) -> Cap<NetConnect>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<NetConnect> for Cap<(Spawn, NetConnect)>

Source§

fn cap_ref(&self) -> Cap<NetConnect>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<NetConnect> for Cap<Ambient>

Source§

fn cap_ref(&self) -> Cap<NetConnect>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<NetConnect> for Cap<NetAll>

Source§

fn cap_ref(&self) -> Cap<NetConnect>

Returns a new Cap<P> proving the permission is available.
Source§

impl<P: Permission> Has<P> for Cap<P>

Source§

fn cap_ref(&self) -> Cap<P>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<Spawn> for Cap<(Ambient, Spawn)>

Source§

fn cap_ref(&self) -> Cap<Spawn>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<Spawn> for Cap<(EnvRead, Spawn)>

Source§

fn cap_ref(&self) -> Cap<Spawn>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<Spawn> for Cap<(EnvWrite, Spawn)>

Source§

fn cap_ref(&self) -> Cap<Spawn>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<Spawn> for Cap<(FsAll, Spawn)>

Source§

fn cap_ref(&self) -> Cap<Spawn>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<Spawn> for Cap<(FsRead, Spawn)>

Source§

fn cap_ref(&self) -> Cap<Spawn>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<Spawn> for Cap<(FsWrite, Spawn)>

Source§

fn cap_ref(&self) -> Cap<Spawn>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<Spawn> for Cap<(NetAll, Spawn)>

Source§

fn cap_ref(&self) -> Cap<Spawn>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<Spawn> for Cap<(NetBind, Spawn)>

Source§

fn cap_ref(&self) -> Cap<Spawn>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<Spawn> for Cap<(NetConnect, Spawn)>

Source§

fn cap_ref(&self) -> Cap<Spawn>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<Spawn> for Cap<(Spawn, Ambient)>

Source§

fn cap_ref(&self) -> Cap<Spawn>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<Spawn> for Cap<(Spawn, EnvRead)>

Source§

fn cap_ref(&self) -> Cap<Spawn>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<Spawn> for Cap<(Spawn, EnvWrite)>

Source§

fn cap_ref(&self) -> Cap<Spawn>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<Spawn> for Cap<(Spawn, FsAll)>

Source§

fn cap_ref(&self) -> Cap<Spawn>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<Spawn> for Cap<(Spawn, FsRead)>

Source§

fn cap_ref(&self) -> Cap<Spawn>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<Spawn> for Cap<(Spawn, FsWrite)>

Source§

fn cap_ref(&self) -> Cap<Spawn>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<Spawn> for Cap<(Spawn, NetAll)>

Source§

fn cap_ref(&self) -> Cap<Spawn>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<Spawn> for Cap<(Spawn, NetBind)>

Source§

fn cap_ref(&self) -> Cap<Spawn>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<Spawn> for Cap<(Spawn, NetConnect)>

Source§

fn cap_ref(&self) -> Cap<Spawn>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<Spawn> for Cap<(Spawn, Spawn)>

Source§

fn cap_ref(&self) -> Cap<Spawn>

Returns a new Cap<P> proving the permission is available.
Source§

impl Has<Spawn> for Cap<Ambient>

Source§

fn cap_ref(&self) -> Cap<Spawn>

Returns a new Cap<P> proving the permission is available.

Auto Trait Implementations§

§

impl<P> Freeze for Cap<P>

§

impl<P> RefUnwindSafe for Cap<P>
where P: RefUnwindSafe,

§

impl<P> !Send for Cap<P>

§

impl<P> !Sync for Cap<P>

§

impl<P> Unpin for Cap<P>
where P: Unpin,

§

impl<P> UnsafeUnpin for Cap<P>

§

impl<P> UnwindSafe for Cap<P>
where P: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

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

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.