mlx_rs::ops

Trait ClipBound

Source
pub trait ClipBound<'min, 'max>: Sealed {
    // Required method
    fn into_min_max(
        self,
    ) -> (Option<impl ScalarOrArray<'min>>, Option<impl ScalarOrArray<'max>>);
}
Expand description

A custom trait for the bound of the clip operation.

This trait is only implemented for tuples of the form (Min, Max), (Min, ()), and ((), Max). The Min and Max types must implement the ScalarOrArray trait.

Required Methods§

Source

fn into_min_max( self, ) -> (Option<impl ScalarOrArray<'min>>, Option<impl ScalarOrArray<'max>>)

Convert the bound into a tuple of optional minimum and maximum values.

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.

Implementations on Foreign Types§

Source§

impl<'max, Max> ClipBound<'max, 'max> for ((), Max)
where Max: ScalarOrArray<'max> + Sealed,

Source§

fn into_min_max( self, ) -> (Option<impl ScalarOrArray<'max>>, Option<impl ScalarOrArray<'max>>)

Source§

impl<'min, 'max, Min, Max> ClipBound<'min, 'max> for (Min, Max)
where Min: ScalarOrArray<'min> + Sealed, Max: ScalarOrArray<'max> + Sealed,

Source§

fn into_min_max( self, ) -> (Option<impl ScalarOrArray<'min>>, Option<impl ScalarOrArray<'max>>)

Source§

impl<'min, Min> ClipBound<'min, 'min> for (Min, ())
where Min: ScalarOrArray<'min> + Sealed,

Source§

fn into_min_max( self, ) -> (Option<impl ScalarOrArray<'min>>, Option<impl ScalarOrArray<'min>>)

Implementors§