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 moresource§impl Debug for SwitchCasesCollection
impl Debug for SwitchCasesCollection
Auto Trait Implementations§
impl !RefUnwindSafe for SwitchCasesCollection
impl !Send for SwitchCasesCollection
impl !Sync for SwitchCasesCollection
impl Unpin for SwitchCasesCollection
impl !UnwindSafe for SwitchCasesCollection
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