pub struct RuntimeAuthorization { /* private fields */ }Expand description
Permissions carried by one authenticated runtime client.
Implementations§
Source§impl RuntimeAuthorization
impl RuntimeAuthorization
Sourcepub fn new(permissions: impl IntoIterator<Item = RuntimePermission>) -> Self
pub fn new(permissions: impl IntoIterator<Item = RuntimePermission>) -> Self
Construct an authorization grant from its exact permission set.
Sourcepub fn interactive() -> Self
pub fn interactive() -> Self
Interactive frontend grant. Frontends may observe, drive turns, and answer requests, but runtime termination remains an operator-only control-plane action.
Sourcepub fn allows(&self, permission: RuntimePermission) -> bool
pub fn allows(&self, permission: RuntimePermission) -> bool
Whether this grant contains permission.
Sourcepub fn permissions(&self) -> impl Iterator<Item = RuntimePermission> + '_
pub fn permissions(&self) -> impl Iterator<Item = RuntimePermission> + '_
Stable ordered permission inventory for descriptors and bindings.
Sourcepub fn restrict_to(&self, requested: &Self) -> Self
pub fn restrict_to(&self, requested: &Self) -> Self
Narrow this grant to permissions also present in requested.
Sourcepub fn header_value(&self) -> String
pub fn header_value(&self) -> String
Stable comma-separated representation used only to narrow an already authenticated transport credential.
Sourcepub fn parse_header(value: &str) -> Result<Self, RuntimeLeaseError>
pub fn parse_header(value: &str) -> Result<Self, RuntimeLeaseError>
Decode a narrowing request. Unknown or duplicate-independent names fail closed instead of being ignored.
Trait Implementations§
Source§impl Clone for RuntimeAuthorization
impl Clone for RuntimeAuthorization
Source§fn clone(&self) -> RuntimeAuthorization
fn clone(&self) -> RuntimeAuthorization
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 RuntimeAuthorization
impl Debug for RuntimeAuthorization
Source§impl Default for RuntimeAuthorization
impl Default for RuntimeAuthorization
Source§fn default() -> RuntimeAuthorization
fn default() -> RuntimeAuthorization
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for RuntimeAuthorization
impl<'de> Deserialize<'de> for RuntimeAuthorization
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for RuntimeAuthorization
Source§impl PartialEq for RuntimeAuthorization
impl PartialEq for RuntimeAuthorization
Source§impl Serialize for RuntimeAuthorization
impl Serialize for RuntimeAuthorization
impl StructuralPartialEq for RuntimeAuthorization
Auto Trait Implementations§
impl Freeze for RuntimeAuthorization
impl RefUnwindSafe for RuntimeAuthorization
impl Send for RuntimeAuthorization
impl Sync for RuntimeAuthorization
impl Unpin for RuntimeAuthorization
impl UnsafeUnpin for RuntimeAuthorization
impl UnwindSafe for RuntimeAuthorization
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.