pub struct ExtCommand {
pub name: String,
pub description: String,
pub plugin: String,
pub plugin_version: String,
pub source: PackageSource,
pub root: PathBuf,
pub file: PathBuf,
pub function: String,
pub read_only: Vec<String>,
pub writes: Vec<String>,
pub uses: Vec<String>,
pub bytecode_dir: Option<PathBuf>,
}Expand description
One command an enabled package declares, as the session runs it.
Fields§
§name: String§description: String§plugin: String§plugin_version: String§source: PackageSource§root: PathBufThe package’s unpacked directory.
file: PathBufThe entry file, inside root.
function: StringThe function the entry file defines that the command calls.
read_only: Vec<String>Argument prefixes, whole words each, that make a call read-only; ""
is the call with no arguments.
writes: Vec<String>Globs relative to the project root that the command may write.
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§
Source§impl ExtCommand
impl ExtCommand
Sourcepub fn is_read_only(&self, args: &[String]) -> bool
pub fn is_read_only(&self, args: &[String]) -> bool
Whether a call with args is read-only: they start with one of the
read_only prefixes, word for word, or there are none and "" is
one of them.
Trait Implementations§
Source§impl Clone for ExtCommand
impl Clone for ExtCommand
Source§impl Debug for ExtCommand
impl Debug for ExtCommand
impl Eq for ExtCommand
Source§impl PartialEq for ExtCommand
impl PartialEq for ExtCommand
impl StructuralPartialEq for ExtCommand
Auto Trait Implementations§
impl Forget for ExtCommand
impl Freeze for ExtCommand
impl Move for ExtCommand
impl RefUnwindSafe for ExtCommand
impl Send for ExtCommand
impl Sync for ExtCommand
impl Unpin for ExtCommand
impl UnsafeUnpin for ExtCommand
impl UnwindSafe for ExtCommand
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