pub struct PluginManifest {
pub name: String,
pub version: String,
pub abi_version: u32,
pub boundary: PluginBoundary,
pub capabilities: Vec<String>,
pub limits: ResourceLimits,
}Fields§
§name: String§version: String§abi_version: u32§boundary: PluginBoundary§capabilities: Vec<String>§limits: ResourceLimitsImplementations§
Source§impl PluginManifest
impl PluginManifest
pub fn process(name: impl Into<String>, version: impl Into<String>) -> Self
pub fn with_capability(self, capability: impl Into<String>) -> Self
pub const fn with_limits(self, limits: ResourceLimits) -> Self
Sourcepub const fn validate(&self) -> Result<(), PluginAuthorizationError>
pub const fn validate(&self) -> Result<(), PluginAuthorizationError>
§Errors
Returns an error when the manifest is empty or targets another ABI.
Sourcepub fn validate_request(
&self,
request: &ToolRequest,
) -> Result<(), PluginAuthorizationError>
pub fn validate_request( &self, request: &ToolRequest, ) -> Result<(), PluginAuthorizationError>
§Errors
Returns an error when the manifest is invalid or a request needs a capability not declared by the plugin.
Trait Implementations§
Source§impl Clone for PluginManifest
impl Clone for PluginManifest
Source§fn clone(&self) -> PluginManifest
fn clone(&self) -> PluginManifest
Returns a duplicate of the value. Read more
1.0.0 · 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 PluginManifest
impl Debug for PluginManifest
Source§impl<'de> Deserialize<'de> for PluginManifest
impl<'de> Deserialize<'de> for PluginManifest
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
Source§impl PartialEq for PluginManifest
impl PartialEq for PluginManifest
Source§impl Serialize for PluginManifest
impl Serialize for PluginManifest
impl Eq for PluginManifest
impl StructuralPartialEq for PluginManifest
Auto Trait Implementations§
impl Freeze for PluginManifest
impl RefUnwindSafe for PluginManifest
impl Send for PluginManifest
impl Sync for PluginManifest
impl Unpin for PluginManifest
impl UnsafeUnpin for PluginManifest
impl UnwindSafe for PluginManifest
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