Enum pancakestack::parse::Command
source · pub enum Command<'a> {
Show 17 variants
PutThisPancakeOnTop(Cow<'a, str>),
EatThePancakeOnTop,
PutTheTopPancakesTogether,
GiveMeAPancake,
HowAboutAHotcake,
ShowMeAPancake,
TakeFromTheTopPancakes,
FlipThePancakesOnTop,
PutAnotherPancakeOnTop,
Label(Cow<'a, str>),
IfThePancakeIsntTastyGoOverTo(Cow<'a, str>),
IfThePancakeIsTastyGoOverTo(Cow<'a, str>),
PutSyrupOnThePancakes,
PutButterOnThePancakes,
TakeOffTheSyrup,
TakeOffTheButter,
EatAllOfThePancakes,
}
Expand description
Variants§
PutThisPancakeOnTop(Cow<'a, str>)
EatThePancakeOnTop
PutTheTopPancakesTogether
GiveMeAPancake
HowAboutAHotcake
ShowMeAPancake
TakeFromTheTopPancakes
FlipThePancakesOnTop
PutAnotherPancakeOnTop
Label(Cow<'a, str>)
IfThePancakeIsntTastyGoOverTo(Cow<'a, str>)
IfThePancakeIsTastyGoOverTo(Cow<'a, str>)
PutSyrupOnThePancakes
PutButterOnThePancakes
TakeOffTheSyrup
TakeOffTheButter
EatAllOfThePancakes
Implementations§
source§impl<'a> Command<'a>
impl<'a> Command<'a>
sourcepub fn from_line(line: &'a str) -> Result<Self, CommandParseError<'a>>
pub fn from_line(line: &'a str) -> Result<Self, CommandParseError<'a>>
sourcepub fn to_owned(&self) -> Command<'static>
pub fn to_owned(&self) -> Command<'static>
Creates a new owned version of this command, heap allocating the referenced str
s.
sourcepub fn into_owned(self) -> Command<'static>
pub fn into_owned(self) -> Command<'static>
Consumes this command, converting it to an owned version, heap allocating the referenced str
s if they are not already owned.
Trait Implementations§
source§impl<'a> PartialEq<Command<'a>> for Command<'a>
impl<'a> PartialEq<Command<'a>> for Command<'a>
impl<'a> Eq for Command<'a>
impl<'a> StructuralEq for Command<'a>
impl<'a> StructuralPartialEq for Command<'a>
Auto Trait Implementations§
impl<'a> RefUnwindSafe for Command<'a>
impl<'a> Send for Command<'a>
impl<'a> Sync for Command<'a>
impl<'a> Unpin for Command<'a>
impl<'a> UnwindSafe for Command<'a>
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