Trait SizedContainer

Source
pub trait SizedContainer: CubeIndex<ExpandElementTyped<u32>, Output = Self::Item> + CubeType {
    type Item: CubeType<ExpandType = ExpandElementTyped<Self::Item>>;

    // Provided method
    fn len(val: &ExpandElement, scope: &mut Scope) -> ExpandElement { ... }
}

Required Associated Types§

Source

type Item: CubeType<ExpandType = ExpandElementTyped<Self::Item>>

Provided Methods§

Source

fn len(val: &ExpandElement, scope: &mut Scope) -> ExpandElement

Return the length of the container.

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.

Implementors§

Source§

impl<C: CubeType<ExpandType = ExpandElementTyped<C>>> SizedContainer for Slice<C>

Source§

type Item = C

Source§

impl<T: CubeType<ExpandType = ExpandElementTyped<T>>> SizedContainer for Array<T>

Source§

type Item = T

Source§

impl<T: CubeType<ExpandType = ExpandElementTyped<T>>> SizedContainer for Tensor<T>

Source§

type Item = T