pub trait IntoPadding<const D: usize> {
// Required method
fn into_padding(self) -> [(usize, usize); D];
}Expand description
Trait for types that can be used as padding specifications.
Padding is specified as (before, after) pairs per dimension, returned as a
fixed-size array [(usize, usize); D]. If fewer pairs than dimensions are provided,
they apply to the last N dimensions (earlier dimensions are left unpadded).
Required Methods§
Sourcefn into_padding(self) -> [(usize, usize); D]
fn into_padding(self) -> [(usize, usize); D]
Converts into a fixed-size array of (before, after) padding pairs.
Implementations on Foreign Types§
Source§impl<const D: usize> IntoPadding<D> for (usize, usize, usize, usize)
Backward-compatible: (left, right, top, bottom) maps to last 2 dimensions.
impl<const D: usize> IntoPadding<D> for (usize, usize, usize, usize)
Backward-compatible: (left, right, top, bottom) maps to last 2 dimensions.
Equivalent to [(top, bottom), (left, right)].