Skip to main content

Squeeze

Trait Squeeze 

Source
pub trait Squeeze {
    type Output;

    // Required method
    fn squeeze(self, dim: i32) -> Self::Output;

    // Provided method
    fn _apply(self, dim: i32) -> Self::Output
       where Self: Sized { ... }
}
Expand description

trait to represent the operation

Required Associated Types§

Source

type Output

the output type

Required Methods§

Source

fn squeeze(self, dim: i32) -> Self::Output

computes the operation

Provided Methods§

Source

fn _apply(self, dim: i32) -> Self::Output
where Self: Sized,

macro convenience version of the primary method

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl Squeeze for Vec<f32>

Source§

type Output = f32

Source§

fn squeeze(self, dim: i32) -> Self::Output

Source§

impl<T: Squeeze> Squeeze for Vec<Vec<T>>
where Vec<T>: Squeeze<Output = T> + Rank,

Source§

type Output = Vec<T>

Source§

fn squeeze(self, dim: i32) -> Self::Output

Implementors§