Skip to main content

Mask

Trait Mask 

Source
pub trait Mask: CubeType + CubeType<ExpandType: MaskExpand> {
    // Required method
    fn should_mask(&self, local_pos: Coords2d) -> bool;

    // Provided method
    fn __expand_should_mask(
        scope: &mut Scope,
        this: <Self as CubeType>::ExpandType,
        local_pos: <Coords2d as CubeType>::ExpandType,
    ) -> <bool as CubeType>::ExpandType { ... }
}
Expand description

Minimal mask abstraction used by row-wise tile operations. Returns true when the element at local_pos should be treated as masked (i.e. driven to -inf by Tile::scale_and_mask).

Required Methods§

Source

fn should_mask(&self, local_pos: Coords2d) -> bool

Provided Methods§

Source

fn __expand_should_mask( scope: &mut Scope, this: <Self as CubeType>::ExpandType, local_pos: <Coords2d as CubeType>::ExpandType, ) -> <bool as CubeType>::ExpandType

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<E: Numeric, Sc: TileScope, IO: SliceVisibility> Mask for Tile<E, Sc, IO>