pub enum DecodedOp {
Show 27 variants
End,
LineNo(u32),
List {
list_type: u32,
is_end: bool,
ops: Vec<DecodedOp>,
},
Sublist {
sublist_type: u32,
negated: bool,
ops: Vec<DecodedOp>,
},
Pipe {
lineno: u32,
ops: Vec<DecodedOp>,
},
Redir {
redir_type: u32,
fd: i32,
target: String,
varid: Option<String>,
},
Assign {
name: String,
value: String,
},
AssignArray {
name: String,
values: Vec<String>,
},
Simple {
args: Vec<String>,
},
Typeset {
args: Vec<String>,
assigns: Vec<DecodedOp>,
},
Subsh {
ops: Vec<DecodedOp>,
},
Cursh {
ops: Vec<DecodedOp>,
},
Timed {
cmd: Option<Box<DecodedOp>>,
},
FuncDef {
name: String,
body: Vec<DecodedOp>,
},
For {
var: String,
list: Vec<String>,
body: Vec<DecodedOp>,
},
ForCond {
init: String,
cond: String,
step: String,
body: Vec<DecodedOp>,
},
Select {
var: String,
list: Vec<String>,
body: Vec<DecodedOp>,
},
While {
cond: Vec<DecodedOp>,
body: Vec<DecodedOp>,
is_until: bool,
},
Repeat {
count: String,
body: Vec<DecodedOp>,
},
Case {
word: String,
cases: Vec<(String, Vec<DecodedOp>)>,
},
CaseItem {
pattern: String,
terminator: u32,
body: Vec<DecodedOp>,
},
If {
if_type: u32,
conditions: Vec<(Vec<DecodedOp>, Vec<DecodedOp>)>,
else_body: Option<Vec<DecodedOp>>,
},
Cond {
cond_type: u32,
args: Vec<String>,
},
Arith {
expr: String,
},
AutoFn,
Try {
try_body: Vec<DecodedOp>,
always_body: Vec<DecodedOp>,
},
Unknown {
code: u32,
data: u32,
},
}Variants§
End
LineNo(u32)
List
Sublist
Pipe
Redir
Assign
AssignArray
Simple
Typeset
Subsh
Cursh
Timed
FuncDef
For
ForCond
Select
While
Repeat
Case
CaseItem
If
Fields
Cond
Arith
AutoFn
Try
Unknown
Implementations§
Source§impl DecodedOp
Convert decoded ZWC ops to our shell AST for execution
impl DecodedOp
Convert decoded ZWC ops to our shell AST for execution
pub fn to_shell_command(&self) -> Option<ShellCommand>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DecodedOp
impl RefUnwindSafe for DecodedOp
impl Send for DecodedOp
impl Sync for DecodedOp
impl Unpin for DecodedOp
impl UnsafeUnpin for DecodedOp
impl UnwindSafe for DecodedOp
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
fn into_sample(self) -> T
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.Source§impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
Source§fn to_owned_obj(&self, data: FontData<'_>) -> U
fn to_owned_obj(&self, data: FontData<'_>) -> U
Convert this type into
T, using the provided data to resolve any offsets.