pub trait Resize: Sized {
type Output;
// Required methods
fn resize_unchecked(self, at_least_bits_precision: u32) -> Self::Output;
fn try_resize(self, at_least_bits_precision: u32) -> Option<Self::Output>;
// Provided method
fn resize(self, at_least_bits_precision: u32) -> Self::Output { ... }
}Expand description
Methods for resizing the allocated storage.
Required Associated Types§
Required Methods§
Sourcefn resize_unchecked(self, at_least_bits_precision: u32) -> Self::Output
fn resize_unchecked(self, at_least_bits_precision: u32) -> Self::Output
Resizes to the minimum storage that fits at_least_bits_precision
without checking if the bit size of self is larger than at_least_bits_precision.
Variable-time w.r.t. at_least_bits_precision.
Sourcefn try_resize(self, at_least_bits_precision: u32) -> Option<Self::Output>
fn try_resize(self, at_least_bits_precision: u32) -> Option<Self::Output>
Resizes to the minimum storage that fits at_least_bits_precision
returning None if the bit size of self is larger than at_least_bits_precision.
Variable-time w.r.t. at_least_bits_precision.
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementors§
Source§impl Resize for &OddBoxedUint
Available on crate feature alloc only.
impl Resize for &OddBoxedUint
Available on crate feature
alloc only.