pub struct Clamp<T> {
pub min: T,
pub max: T,
}Expand description
Clamp between min and max using Ord
This is a split-state combinator because the bounds are immutable configuration.
Fields§
§min: TLowest output value
max: THighest output value
Trait Implementations§
impl<T: Copy> Copy for Clamp<T>
Source§impl<T: Copy> SplitInplace<T> for Clamp<T>where
Self: SplitProcess<T>,
impl<T: Copy> SplitInplace<T> for Clamp<T>where
Self: SplitProcess<T>,
Auto Trait Implementations§
impl<T> Freeze for Clamp<T>where
T: Freeze,
impl<T> RefUnwindSafe for Clamp<T>where
T: RefUnwindSafe,
impl<T> Send for Clamp<T>where
T: Send,
impl<T> Sync for Clamp<T>where
T: Sync,
impl<T> Unpin for Clamp<T>where
T: Unpin,
impl<T> UnsafeUnpin for Clamp<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for Clamp<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<'a, X, S, T, const L: usize> SplitViewInplace<ViewMut<'a, X, FrameMajor, L>, S> for T
impl<'a, X, S, T, const L: usize> SplitViewInplace<ViewMut<'a, X, FrameMajor, L>, S> for T
Source§fn inplace_view(&self, state: &mut S, xy: ViewMut<'a, X, FrameMajor, L>)
fn inplace_view(&self, state: &mut S, xy: ViewMut<'a, X, FrameMajor, L>)
Process one typed view in place.
Source§impl<'a, 'b, X, Y, S, T, const L: usize> SplitViewProcess<View<'a, X, FrameMajor, L>, ViewMut<'b, Y, FrameMajor, L>, S> for T
impl<'a, 'b, X, Y, S, T, const L: usize> SplitViewProcess<View<'a, X, FrameMajor, L>, ViewMut<'b, Y, FrameMajor, L>, S> for T
Source§fn process_view(
&self,
state: &mut S,
x: View<'a, X, FrameMajor, L>,
y: ViewMut<'b, Y, FrameMajor, L>,
)
fn process_view( &self, state: &mut S, x: View<'a, X, FrameMajor, L>, y: ViewMut<'b, Y, FrameMajor, L>, )
Process one typed input view into one typed output view.