pub struct Context {
pub caller: [u8; 32],
pub profile: Profile,
pub now: i64,
pub request: Option<Request>,
pub proofs: HashMap<String, Vec<u8>>,
}Expand description
What a token is authorized against: the request’s verified caller, the
provider’s profile, the time in seconds, the request (None to check the
token alone, as a gate with no request in front of it), and the proofs
that travelled with it, keyed by proof_id.
Fields§
§caller: [u8; 32]§profile: Profile§now: i64§request: Option<Request>§proofs: HashMap<String, Vec<u8>>Implementations§
Trait Implementations§
impl Eq for Context
impl StructuralPartialEq for Context
Auto Trait Implementations§
impl Freeze for Context
impl RefUnwindSafe for Context
impl Send for Context
impl Sync for Context
impl Unpin for Context
impl UnsafeUnpin for Context
impl UnwindSafe for Context
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