pub trait CnextPowerOfTwo: Sized {
type Output;
type Error;
// Required method
fn cnext_power_of_two(self) -> Result<Self::Output, Self::Error>;
}Expand description
Checked next power of 2, returning an error if overflow occured.
See also: module documentation.
Required Associated Types§
Required Methods§
Sourcefn cnext_power_of_two(self) -> Result<Self::Output, Self::Error>
fn cnext_power_of_two(self) -> Result<Self::Output, Self::Error>
Checked next power of 2, returning an error if overflow occured.
Wrapper for checked_next_power_of_two.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".