pub enum PaddingMode<const N: usize, T: NumAssign + Copy> {
Zeros,
Const(T),
Reflect,
Replicate,
Circular,
Custom([BorderType<T>; N]),
Explicit([[BorderType<T>; 2]; N]),
}
Expand description
Specifies the padding mode, which determines how to handle borders.
The padding mode can be either a single BorderType
applied on all sides
or a custom tuple of two BorderTypes
for each dimension or a BorderType
for each side of each dimension.
Variants§
Zeros
Pads with zeros.
Const(T)
Pads with a constant value.
Reflect
Reflects the input at the borders.
Replicate
Replicates the edge values.
Circular
Treats the input as a circular buffer.
Custom([BorderType<T>; N])
Specifies a different BorderType
for each dimension.
Explicit([[BorderType<T>; 2]; N])
Specifies a different BorderType
for each side of each dimension.
Trait Implementations§
Source§impl<const N: usize, T: Clone + NumAssign + Copy> Clone for PaddingMode<N, T>
impl<const N: usize, T: Clone + NumAssign + Copy> Clone for PaddingMode<N, T>
Source§fn clone(&self) -> PaddingMode<N, T>
fn clone(&self) -> PaddingMode<N, T>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreimpl<const N: usize, T: Copy + NumAssign + Copy> Copy for PaddingMode<N, T>
Auto Trait Implementations§
impl<const N: usize, T> Freeze for PaddingMode<N, T>where
T: Freeze,
impl<const N: usize, T> RefUnwindSafe for PaddingMode<N, T>where
T: RefUnwindSafe,
impl<const N: usize, T> Send for PaddingMode<N, T>where
T: Send,
impl<const N: usize, T> Sync for PaddingMode<N, T>where
T: Sync,
impl<const N: usize, T> Unpin for PaddingMode<N, T>where
T: Unpin,
impl<const N: usize, T> UnwindSafe for PaddingMode<N, T>where
T: UnwindSafe,
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