pub struct Manifest {
pub name: String,
pub version: String,
pub capabilities: Vec<CapabilityName>,
pub entry_point: String,
}Expand description
A skill manifest without the signature: the signed payload.
Fields§
§name: StringUnique skill name (e.g. “web-fetch”).
version: StringSkill version (e.g. “1.0.0”).
capabilities: Vec<CapabilityName>Declared capabilities: subset of the broker’s capability
vocabulary (e.g. net.egress, fs.read).
entry_point: StringEntry point within the skill package (e.g. main.py).
Implementations§
Source§impl Manifest
impl Manifest
Sourcepub fn canonical_bytes(&self) -> Result<Vec<u8>, Error>
pub fn canonical_bytes(&self) -> Result<Vec<u8>, Error>
The signed payload: SIGNING_CONTEXT, then the compact JSON
described in the module docs.
§Errors
Returns Error::InvalidManifest if JSON serialization fails.
Sourcepub fn validate(&self) -> Result<(), Error>
pub fn validate(&self) -> Result<(), Error>
Checks the fields a loader acts on: a non-empty name and version,
and an entry point that is a non-empty relative path made only of
plain components (no .., no root, no leading ., no NUL), so it
can never name a file outside the skill package.
§Errors
Returns Error::InvalidManifest naming the offending field.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Manifest
impl<'de> Deserialize<'de> for Manifest
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
impl Eq for Manifest
impl StructuralPartialEq for Manifest
Auto Trait Implementations§
impl Freeze for Manifest
impl RefUnwindSafe for Manifest
impl Send for Manifest
impl Sync for Manifest
impl Unpin for Manifest
impl UnsafeUnpin for Manifest
impl UnwindSafe for Manifest
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