validate_power_of_two

Function validate_power_of_two 

Source
pub fn validate_power_of_two(value: usize) -> SubXResult<()>
Expand description

Validate that a value is a power of two.

§Arguments

  • value - The value to check

§Errors

Returns error if the value is not a power of two.