Struct rhai::SwitchCasesCollection
source · [−]pub struct SwitchCasesCollection {
pub expressions: StaticVec<ConditionalExpr>,
pub cases: BTreeMap<u64, SmallVec<[usize; 1]>>,
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: BTreeMap<u64, SmallVec<[usize; 1]>>
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
sourceimpl Clone for SwitchCasesCollection
impl Clone for SwitchCasesCollection
sourcefn clone(&self) -> SwitchCasesCollection
fn clone(&self) -> SwitchCasesCollection
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl 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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more