pub struct Limit(/* private fields */);
Expand description
A shaping constraint that bounds the maximum extent allowed in any reshaped dimension.
This limit controls how a given dimension is factored during
reshaping. Values larger than limit
are recursively decomposed
into smaller factors (e.g., reshape_with_limit([1024], Limit::new(32))
→ [32, 32]
).
The default limit is 32
, which balances fanout depth and layout
regularity.
§Example
use ndslice::reshape::Limit;
let limit = Limit::new(64);
assert_eq!(limit.get(), 64);
Implementations§
Trait Implementations§
Source§impl Ord for Limit
impl Ord for Limit
Source§impl PartialOrd for Limit
impl PartialOrd for Limit
impl Copy for Limit
impl Eq for Limit
impl StructuralPartialEq for Limit
Auto Trait Implementations§
impl Freeze for Limit
impl RefUnwindSafe for Limit
impl Send for Limit
impl Sync for Limit
impl Unpin for Limit
impl UnwindSafe for Limit
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more