pub enum Force {
Table,
Tree,
Walk,
}Expand description
A shape forced on every switch, which is what -Zswitch= asks for.
For measuring and for nothing else. Section 24.7 asks what each shape costs on a hot switch,
and the only way to know what a table would have cost where a tree was chosen is to build the
table. A bit test is not one of these, since it holds three destinations inside one word and a
switch hot enough to be worth measuring is neither.
Variants§
Table
One jump table over every case, when their span is at most FORCED_CELLS.
Tree
A binary search all the way down to single clusters, with no table and no bit test.
Walk
Every cluster tested one after another, with no table and no bit test.
Implementations§
Trait Implementations§
impl Copy for Force
impl Eq for Force
impl StructuralPartialEq for Force
Auto Trait Implementations§
impl Freeze for Force
impl RefUnwindSafe for Force
impl Send for Force
impl Sync for Force
impl Unpin for Force
impl UnsafeUnpin for Force
impl UnwindSafe for Force
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