pub trait BitsFitIn<T> {
    fn fit(self) -> T;
}
Expand description

A conversion type for fitting the bits of one type into the bits of another type

This differs from Into because the value may not be semantically the same, this trait just asserts that the conversion can be done injectively.

The default implementation for our numeric types is to zero-extend the bits to fit the target size.

Required Methods

Fits self into the target type

Implementations on Foreign Types

Implementors