pub struct PluginFunction {
pub name: String,
pub plugin: String,
pub plugin_version: String,
pub source: PackageSource,
pub description: String,
pub root: PathBuf,
pub file: PathBuf,
pub function: String,
pub writes: Vec<String>,
pub input_schema: Option<Value>,
pub uses: Vec<String>,
pub bytecode_dir: Option<PathBuf>,
}Expand description
One function an enabled package declares for the host to call, never the
model: <plugin>.<name>.
Fields§
§name: String§plugin: String§plugin_version: String§source: PackageSource§description: String§root: PathBufThe package’s unpacked directory.
file: PathBufThe entry file, inside root.
function: StringThe function the entry file defines, called as (input, ctx).
writes: Vec<String>Globs relative to the project root that a writing call may write.
input_schema: Option<Value>The JSON Schema input is checked against before the call.
uses: Vec<String>The host libraries the package declares, by namespace.
bytecode_dir: Option<PathBuf>Where compiled entries are kept between runs; None compiles every run.
Implementations§
Trait Implementations§
Source§impl Clone for PluginFunction
impl Clone for PluginFunction
Source§impl Debug for PluginFunction
impl Debug for PluginFunction
impl Eq for PluginFunction
Source§impl PartialEq for PluginFunction
impl PartialEq for PluginFunction
impl StructuralPartialEq for PluginFunction
Auto Trait Implementations§
impl Forget for PluginFunction
impl Freeze for PluginFunction
impl Move for PluginFunction
impl RefUnwindSafe for PluginFunction
impl Send for PluginFunction
impl Sync for PluginFunction
impl Unpin for PluginFunction
impl UnsafeUnpin for PluginFunction
impl UnwindSafe for PluginFunction
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