Struct rhai::SwitchCasesCollection
source · pub struct SwitchCasesCollection {
pub expressions: StaticVec<ConditionalExpr>,
pub cases: HashMap<u64, SmallVec<[usize; 1]>, StraightHasherBuilder>,
pub ranges: StaticVec<RangeCase>,
pub def_case: Option<usize>,
}
Expand description
(internals) A type containing all cases for a switch
statement.
Exported under the internals
feature only.
Fields§
§expressions: StaticVec<ConditionalExpr>
List of ConditionalExpr
’s.
cases: HashMap<u64, SmallVec<[usize; 1]>, StraightHasherBuilder>
Dictionary mapping value hashes to ConditionalExpr
’s.
ranges: StaticVec<RangeCase>
List of range cases.
def_case: Option<usize>
Statements block for the default case (there can be no condition for the default case).
Trait Implementations§
source§impl Clone for SwitchCasesCollection
impl Clone for SwitchCasesCollection
source§fn clone(&self) -> SwitchCasesCollection
fn clone(&self) -> SwitchCasesCollection
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more