pub enum BorderMode<T> {
Constant(T),
Mirror,
Nearest,
Reflect,
Wrap,
}Expand description
Method that will be used to determines how the input array is extended beyond its boundaries.
Variants§
Constant(T)
The input is extended by filling all values beyond the edge with the same constant value,
[1, 2, 3] -> [T, T, 1, 2, 3, T, T]
Mirror
The input is extended by reflecting about the center of the last pixel.
[1, 2, 3] -> [3, 2, 1, 2, 3, 2, 1]
Nearest
The input is extended by replicating the last pixel.
[1, 2, 3] -> [1, 1, 1, 2, 3, 3, 3]
Reflect
The input is extended by reflecting about the edge of the last pixel.
[1, 2, 3] -> [2, 1, 1, 2, 3, 3, 2]
Wrap
The input is extended by wrapping around to the opposite edge.
[1, 2, 3] -> [2, 3, 1, 2, 3, 1, 2]
Trait Implementations§
Source§impl<T: Clone> Clone for BorderMode<T>
impl<T: Clone> Clone for BorderMode<T>
Source§fn clone(&self) -> BorderMode<T>
fn clone(&self) -> BorderMode<T>
Returns a copy 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 moreSource§impl<T: Debug> Debug for BorderMode<T>
impl<T: Debug> Debug for BorderMode<T>
Source§impl<T: PartialEq> PartialEq for BorderMode<T>
impl<T: PartialEq> PartialEq for BorderMode<T>
impl<T: Copy> Copy for BorderMode<T>
impl<T> StructuralPartialEq for BorderMode<T>
Auto Trait Implementations§
impl<T> Freeze for BorderMode<T>where
T: Freeze,
impl<T> RefUnwindSafe for BorderMode<T>where
T: RefUnwindSafe,
impl<T> Send for BorderMode<T>where
T: Send,
impl<T> Sync for BorderMode<T>where
T: Sync,
impl<T> Unpin for BorderMode<T>where
T: Unpin,
impl<T> UnwindSafe for BorderMode<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