pub struct ContextToken { /* private fields */ }Expand description
A context token tracking data exposure for an object.
Context tokens are append-only: exposure 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 exposure labels.
Implementations§
Source§impl ContextToken
impl ContextToken
Sourcepub fn exposure_labels(&self) -> &[ExposureLabel]
pub fn exposure_labels(&self) -> &[ExposureLabel]
Get the current exposure labels.
Sourcepub fn has_exposure(&self, label: &ExposureLabel) -> bool
pub fn has_exposure(&self, label: &ExposureLabel) -> bool
Check if this context has a specific exposure label.
Sourcepub fn is_exposed(&self) -> bool
pub fn is_exposed(&self) -> bool
Check if this context has any exposure 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