Treatment saturatingToU8

std/conv::saturatingToU8


Generics

◻ T: SaturatingToU8

Inputs

⇥ value: Stream<T>

Outputs

↦ into: Stream<u8>


Turns stream into u8 one, saturating if needed.

This treatment manages saturating and infaillible conversion to u8. If incoming data represents something out of bounds for u8, then the resulting value is set to minimum or maximum, depending what is the closest to truth.