Struct rhai::SwitchCases
source · [−]pub struct SwitchCases {
pub cases: BTreeMap<u64, Box<ConditionalStmtBlock>>,
pub def_case: Box<StmtBlock>,
pub ranges: StaticVec<(INT, INT, bool, Box<ConditionalStmtBlock>)>,
}
Expand description
(internals) A type containing all cases for a switch
statement.
Exported under the internals
feature only.
Fields
cases: BTreeMap<u64, Box<ConditionalStmtBlock>>
Dictionary mapping value hashes to ConditionalStmtBlock
’s.
def_case: Box<StmtBlock>
Statements block for the default case (there can be no condition for the default case).
ranges: StaticVec<(INT, INT, bool, Box<ConditionalStmtBlock>)>
List of range cases.
Trait Implementations
sourceimpl Clone for SwitchCases
impl Clone for SwitchCases
sourcefn clone(&self) -> SwitchCases
fn clone(&self) -> SwitchCases
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 SwitchCases
impl Debug for SwitchCases
Auto Trait Implementations
impl !RefUnwindSafe for SwitchCases
impl !Send for SwitchCases
impl !Sync for SwitchCases
impl Unpin for SwitchCases
impl !UnwindSafe for SwitchCases
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
sourceimpl<T> CallHasher for T where
T: Hash + ?Sized,
impl<T> CallHasher for T where
T: Hash + ?Sized,
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more