pub enum PadMode<T> {
    Constant(T),
    Edge,
    Maximum,
    Mean,
    Median,
    Minimum,
    Reflect,
    Symmetric,
    Wrap,
}
Expand description

Method that will be used to select the padded values.

Variants

Constant(T)

Pads with a constant value.

[1, 2, 3] -> [T, T, 1, 2, 3, T, T]

Edge

Pads with the edge values of array.

[1, 2, 3] -> [1, 1, 1, 2, 3, 3, 3]

Maximum

Pads with the maximum value of all or part of the vector along each axis.

[1, 2, 3] -> [3, 3, 1, 2, 3, 3, 3]

Mean

Pads with the mean value of all or part of the vector along each axis.

[1, 2, 3] -> [2, 2, 1, 2, 3, 2, 2]

Median

Pads with the median value of all or part of the vector along each axis.

[1, 2, 3] -> [2, 2, 1, 2, 3, 2, 2]

Minimum

Pads with the minimum value of all or part of the vector along each axis.

[1, 2, 3] -> [1, 1, 1, 2, 3, 1, 1]

Reflect

Pads with the reflection of the vector mirrored on the first and last values of the vector along each axis.

[1, 2, 3] -> [3, 2, 1, 2, 3, 2, 1]

Symmetric

Pads with the reflection of the vector mirrored along the edge of the array.

[1, 2, 3] -> [2, 1, 1, 2, 3, 3, 2]

Wrap

Pads with the wrap of the vector along the axis. The first values are used to pad the end and the end values are used to pad the beginning.

[1, 2, 3] -> [2, 3, 1, 2, 3, 1, 2]

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.