Trait gardiz::bits::CastSigned
source · pub trait CastSigned: Unsigned {
type Target;
// Required method
fn cast_signed(&self) -> Self::Target;
}
Expand description
Trait for bit-casts from unsigned integers to 2’s complement signed integers.
Required Associated Types§
Required Methods§
sourcefn cast_signed(&self) -> Self::Target
fn cast_signed(&self) -> Self::Target
Bit-casts the given (self
) unsigned number into a signed version.