Skip to main content

u64_from_i64_saturating

Function u64_from_i64_saturating 

Source
pub fn u64_from_i64_saturating(val: i64) -> u64
Expand description

Converts an i64 to u64, saturating at zero.

Suits a signed count where a negative value means nothing is left, such as an available-block count that goes negative once a filesystem reserve is overdrawn.