pub struct PluginTool { /* private fields */ }Implementations§
Source§impl PluginTool
impl PluginTool
pub fn new( plugin_id: impl Into<String>, plugin_name: impl Into<String>, definition: PluginToolDefinition, command: impl Into<String>, args: Vec<String>, required_permission: PluginToolPermission, root: Option<PathBuf>, ) -> Self
pub fn plugin_id(&self) -> &str
pub fn definition(&self) -> &PluginToolDefinition
pub fn required_permission(&self) -> &str
pub fn execute(&self, input: &Value) -> Result<String, PluginError>
Trait Implementations§
Source§impl Clone for PluginTool
impl Clone for PluginTool
Source§fn clone(&self) -> PluginTool
fn clone(&self) -> PluginTool
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 PluginTool
impl Debug for PluginTool
Source§impl PartialEq for PluginTool
impl PartialEq for PluginTool
impl StructuralPartialEq for PluginTool
Auto Trait Implementations§
impl Freeze for PluginTool
impl RefUnwindSafe for PluginTool
impl Send for PluginTool
impl Sync for PluginTool
impl Unpin for PluginTool
impl UnsafeUnpin for PluginTool
impl UnwindSafe for PluginTool
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