pub struct AdaptiveLevel { /* private fields */ }Expand description
Hill climb over the distinct zrip levels of one range.
Implementations§
Source§impl AdaptiveLevel
impl AdaptiveLevel
Sourcepub fn new(range: RangeInclusive<i32>, start: i32) -> Self
pub fn new(range: RangeInclusive<i32>, start: i32) -> Self
Walks the distinct levels in range, starting at the first level not
below start, or at the highest. As in CompressContext, level -8
runs as -7 and level 0 as the default level.
§Panics
If range holds no zrip level.
Sourcepub fn update(
&mut self,
stats: CompressStats,
bottleneck: Option<Bottleneck>,
) -> i32
pub fn update( &mut self, stats: CompressStats, bottleneck: Option<Bottleneck>, ) -> i32
Records one window at the current level and returns the next level.
bottleneck is None when the window shows no clear one; the level
then holds, though a pending step can still be reverted.
Trait Implementations§
Source§impl Clone for AdaptiveLevel
impl Clone for AdaptiveLevel
Auto Trait Implementations§
impl Forget for AdaptiveLevel
impl Freeze for AdaptiveLevel
impl Move for AdaptiveLevel
impl RefUnwindSafe for AdaptiveLevel
impl Send for AdaptiveLevel
impl Sync for AdaptiveLevel
impl Unpin for AdaptiveLevel
impl UnsafeUnpin for AdaptiveLevel
impl UnwindSafe for AdaptiveLevel
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