pub struct StopDecl {
pub name: String,
pub args: Vec<Ty>,
pub ret: Ty,
pub package: Option<String>,
pub params: Vec<Option<String>>,
pub defaults: Vec<Option<Value>>,
pub doc: Option<String>,
pub text_param: Option<usize>,
}Expand description
The declaration of a stop command.
Fields§
§name: StringThe command name (package.command).
args: Vec<Ty>Parameter types.
ret: TyThe return type.
package: Option<String>The package that provides the command (only when registered with Registry::package). Scripts cannot use this command
unless they import that package.
params: Vec<Option<String>>Parameter names (only those given at registration; as many as the parameters).
defaults: Vec<Option<Value>>Default values of parameters (as many as the parameters; parameters with defaults come last).
doc: Option<String>A description (used for completion in tools).
text_param: Option<usize>The indices of parameters (str) that a text table can translate. Only when the script writes them as string literals
and the line has a stable ID, they are replaced with the translation under that line’s key (module.label#id)
(section 5.2a of spec/host/05-texts.md).
Trait Implementations§
impl StructuralPartialEq for StopDecl
Auto Trait Implementations§
impl Forget for StopDecl
impl Freeze for StopDecl
impl Move for StopDecl
impl RefUnwindSafe for StopDecl
impl Send for StopDecl
impl Sync for StopDecl
impl Unpin for StopDecl
impl UnsafeUnpin for StopDecl
impl UnwindSafe for StopDecl
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