pub struct ContextToken { /* private fields */ }Expand description
A context token tracking data exposure for an object.
Context tokens are append-only: taint labels can be added but never removed. The token is a base64-encoded Biscuit with an authority block identifying the session and subsequent blocks recording taint labels.
Implementations§
Source§impl ContextToken
impl ContextToken
Sourcepub fn taint_labels(&self) -> &[TaintLabel]
pub fn taint_labels(&self) -> &[TaintLabel]
Get the current taint labels.
Sourcepub fn has_taint(&self, label: &TaintLabel) -> bool
pub fn has_taint(&self, label: &TaintLabel) -> bool
Check if this context has a specific taint label.
Sourcepub fn is_tainted(&self) -> bool
pub fn is_tainted(&self) -> bool
Check if this context has any taint labels.
Trait Implementations§
Source§impl Clone for ContextToken
impl Clone for ContextToken
Source§fn clone(&self) -> ContextToken
fn clone(&self) -> ContextToken
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ContextToken
impl RefUnwindSafe for ContextToken
impl Send for ContextToken
impl Sync for ContextToken
impl Unpin for ContextToken
impl UnsafeUnpin for ContextToken
impl UnwindSafe for ContextToken
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