pub struct Package { /* private fields */ }Expand description
A package: its name, its description, and the functions it serves.
Implementations§
Source§impl Package
impl Package
pub fn new( name: impl Into<String>, description: impl Into<String>, functions: Vec<Function>, ) -> Self
Sourcepub fn with_version(self, version: impl Into<String>) -> Self
pub fn with_version(self, version: impl Into<String>) -> Self
The version each result’s serverInfo reports; package! sets the
crate’s own.
pub fn functions(&self) -> &[Function]
pub fn manifest(&self) -> Manifest
Sourcepub fn call(&self, tool: &str, input: Input) -> Result<Output, ToolError>
pub fn call(&self, tool: &str, input: Input) -> Result<Output, ToolError>
Calls the function named tool.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Package
impl !Send for Package
impl !Sync for Package
impl !UnwindSafe for Package
impl Freeze for Package
impl Unpin for Package
impl UnsafeUnpin for Package
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