pub struct CapabilityRequest {
pub description: Option<LocalizedString>,
pub params: BTreeMap<String, Value>,
pub constraints: Vec<Constraint>,
}Expand description
Uniform capability request — one entry per capability class in the
act:component std.capabilities map.
Fields§
§description: Option<LocalizedString>Human/LLM-facing rationale (drives the enrollment UI and audit).
params: BTreeMap<String, Value>Class-specific scalar parameters, e.g. filesystem mount-root.
constraints: Vec<Constraint>The self-declared ceiling (allow-only; deny lives on the host grant).
allow is accepted as an alias so existing act.toml parses.
Implementations§
Source§impl CapabilityRequest
impl CapabilityRequest
Sourcepub fn constraints_as<T: DeserializeOwned>(&self) -> Result<Vec<T>, Error>
pub fn constraints_as<T: DeserializeOwned>(&self) -> Result<Vec<T>, Error>
Parse this request’s constraints into a typed constraint schema
(e.g. FilesystemAllow). Used by host providers.
Trait Implementations§
Source§impl Clone for CapabilityRequest
impl Clone for CapabilityRequest
Source§fn clone(&self) -> CapabilityRequest
fn clone(&self) -> CapabilityRequest
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CapabilityRequest
impl Debug for CapabilityRequest
Source§impl Default for CapabilityRequest
impl Default for CapabilityRequest
Source§fn default() -> CapabilityRequest
fn default() -> CapabilityRequest
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for CapabilityRequest
impl<'de> Deserialize<'de> for CapabilityRequest
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for CapabilityRequest
impl RefUnwindSafe for CapabilityRequest
impl Send for CapabilityRequest
impl Sync for CapabilityRequest
impl Unpin for CapabilityRequest
impl UnsafeUnpin for CapabilityRequest
impl UnwindSafe for CapabilityRequest
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