packkit/level
Types
Compression level abstraction shared by codecs that expose a roughly “store .. best” numeric axis.
pub opaque type Level
Why a checked level constructor rejected the requested value.
pub type LevelError {
LevelOutOfRange(value: Int)
}
Constructors
-
LevelOutOfRange(value: Int)
Values
pub fn custom_checked(
value value: Int,
) -> Result(Level, LevelError)
Build a custom level or return a typed error when it falls outside
the current generic range of 0..9.
pub fn label(level: Level) -> String
Stable string label for docs, tests, and diagnostics.