pub struct NewCommand {
pub name: &'static str,
pub tool: &'static str,
pub description: &'static str,
pub arguments: &'static [NewArgument],
/* private fields */
}Fields§
§name: &'static strAs in sofie new <name>.
tool: &'static str§description: &'static str§arguments: &'static [NewArgument]Implementations§
Source§impl NewCommand
impl NewCommand
Sourcepub fn parse<'arguments>(
&self,
arguments: &'arguments [String],
) -> Result<(NewCode, &'arguments [String]), String>
pub fn parse<'arguments>( &self, arguments: &'arguments [String], ) -> Result<(NewCode, &'arguments [String]), String>
The code to write and the arguments after this command’s own, or what is wrong with them.
pub fn build( &self, value: impl Fn(&str) -> Option<String>, ) -> Result<NewCode, String>
pub fn usage(&self) -> String
Auto Trait Implementations§
impl Freeze for NewCommand
impl RefUnwindSafe for NewCommand
impl Send for NewCommand
impl Sync for NewCommand
impl Unpin for NewCommand
impl UnsafeUnpin for NewCommand
impl UnwindSafe for NewCommand
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