pub struct DesignationContext {
pub subject: ObjectId,
pub args: Option<Value>,
/* private fields */
}Expand description
Per-call context handed to a DesignationResolver.
The typed core (subject, args) covers the most common shapes; the
extension bag carries anything else the caller wants to make available
to resolvers, keyed by Rust type. A WebappResolver, for instance,
reads its session via ctx.get::<AuthSession>() where AuthSession
is whatever the consuming application defines.
Fields§
§subject: ObjectIdThe principal that will be the subject of the minted capability.
args: Option<Value>Per-call arguments (e.g., the JSON body of a tool invocation).
Implementations§
Source§impl DesignationContext
impl DesignationContext
Sourcepub fn new(subject: ObjectId) -> Self
pub fn new(subject: ObjectId) -> Self
Build a context for a subject. Args and extensions are unset; chain
Self::with_args and Self::insert as needed.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DesignationContext
impl !RefUnwindSafe for DesignationContext
impl Send for DesignationContext
impl Sync for DesignationContext
impl Unpin for DesignationContext
impl UnsafeUnpin for DesignationContext
impl !UnwindSafe for DesignationContext
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