pub enum Promise {
Audio,
Bpf,
Chown,
Cpath,
Disklabel,
Dns,
Dpath,
Drm,
Error,
Exec,
Fattr,
Flock,
Getpw,
Id,
Inet,
Ioctl,
Mcast,
Pf,
Proc,
ProtExec,
Ps,
Recvfd,
Route,
Rpath,
Sendfd,
Settime,
Stdio,
Tape,
Tmppath,
Tty,
Unix,
Unveil,
Video,
Vminfo,
Vmm,
Wpath,
Wroute,
#[doc(hidden)]
_NonExhaustive,
}
impl Promise {
pub fn to_promise_string(&self) -> &'static str {
match *self {
Promise::Audio => "audio",
Promise::Bpf => "bpf",
Promise::Chown => "chown",
Promise::Cpath => "cpath",
Promise::Disklabel => "disklabel",
Promise::Dns => "dns",
Promise::Dpath => "dpath",
Promise::Drm => "drm",
Promise::Error => "error",
Promise::Exec => "exec",
Promise::Fattr => "fattr",
Promise::Flock => "flock",
Promise::Getpw => "getpw",
Promise::Id => "id",
Promise::Inet => "inet",
Promise::Ioctl => "ioctl",
Promise::Mcast => "mcast",
Promise::Pf => "pf",
Promise::Proc => "proc",
Promise::ProtExec => "prot_exec",
Promise::Ps => "ps",
Promise::Recvfd => "recvfd",
Promise::Route => "route",
Promise::Rpath => "rpath",
Promise::Sendfd => "sendfd",
Promise::Settime => "settime",
Promise::Stdio => "stdio",
Promise::Tape => "tape",
Promise::Tmppath => "tmppath",
Promise::Tty => "tty",
Promise::Unix => "unix",
Promise::Unveil => "unveil",
Promise::Video => "video",
Promise::Vminfo => "vminfo",
Promise::Vmm => "vmm",
Promise::Wpath => "wpath",
Promise::Wroute => "wroute",
_ => panic!("Promise::to_promise_string is incomplete (bug)"),
}
}
}