pub struct HessraContext { /* private fields */ }Expand description
Builder for creating Hessra context tokens.
Context tokens identify a session and track data exposure (exposure labels) as append-only Biscuit blocks.
§Example
use hessra_context_token::HessraContext;
use hessra_token_core::{KeyPair, TokenTimeConfig};
let keypair = KeyPair::new();
let token = HessraContext::new(
"agent:openclaw".to_string(),
TokenTimeConfig::default(),
)
.issue(&keypair)
.expect("Failed to create context token");Implementations§
Source§impl HessraContext
impl HessraContext
Sourcepub fn new(subject: String, time_config: TokenTimeConfig) -> Self
pub fn new(subject: String, time_config: TokenTimeConfig) -> Self
Creates a new context token builder.
§Arguments
subject- The session owner identifier (e.g., “agent:openclaw”)time_config- Time configuration for token validity
Auto Trait Implementations§
impl Freeze for HessraContext
impl RefUnwindSafe for HessraContext
impl Send for HessraContext
impl Sync for HessraContext
impl Unpin for HessraContext
impl UnsafeUnpin for HessraContext
impl UnwindSafe for HessraContext
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