#[repr(i32)]pub enum InterpolationMode {
Nn = 0,
Bilinear = 1,
}Expand description
Overall mode for interpolating new elements when upsampling. NN - Nearest Neighbors - simply pick the nearest true value for interpolated values. BILINEAR - Use bilinear interpolation. See LinearUpsamplingMode for behavior.
Variants§
Implementations§
Source§impl InterpolationMode
impl InterpolationMode
Sourcepub fn as_str_name(&self) -> &'static str
pub fn as_str_name(&self) -> &'static str
String value of the enum field names used in the ProtoBuf definition.
The values are not transformed in any way and thus are considered stable (if the ProtoBuf definition does not change) and safe for programmatic use.
Sourcepub fn from_str_name(value: &str) -> Option<Self>
pub fn from_str_name(value: &str) -> Option<Self>
Creates an enum from field names used in the ProtoBuf definition.
Trait Implementations§
Source§impl Clone for InterpolationMode
impl Clone for InterpolationMode
Source§fn clone(&self) -> InterpolationMode
fn clone(&self) -> InterpolationMode
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for InterpolationMode
impl Debug for InterpolationMode
Source§impl Default for InterpolationMode
impl Default for InterpolationMode
Source§fn default() -> InterpolationMode
fn default() -> InterpolationMode
Returns the “default value” for a type. Read more
Source§impl From<InterpolationMode> for i32
impl From<InterpolationMode> for i32
Source§fn from(value: InterpolationMode) -> i32
fn from(value: InterpolationMode) -> i32
Converts to this type from the input type.
Source§impl Hash for InterpolationMode
impl Hash for InterpolationMode
Source§impl Ord for InterpolationMode
impl Ord for InterpolationMode
Source§fn cmp(&self, other: &InterpolationMode) -> Ordering
fn cmp(&self, other: &InterpolationMode) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for InterpolationMode
impl PartialEq for InterpolationMode
Source§fn eq(&self, other: &InterpolationMode) -> bool
fn eq(&self, other: &InterpolationMode) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for InterpolationMode
impl PartialOrd for InterpolationMode
Source§impl TryFrom<i32> for InterpolationMode
impl TryFrom<i32> for InterpolationMode
Source§type Error = UnknownEnumValue
type Error = UnknownEnumValue
The type returned in the event of a conversion error.
Source§fn try_from(value: i32) -> Result<InterpolationMode, UnknownEnumValue>
fn try_from(value: i32) -> Result<InterpolationMode, UnknownEnumValue>
Performs the conversion.
impl Copy for InterpolationMode
impl Eq for InterpolationMode
impl StructuralPartialEq for InterpolationMode
Auto Trait Implementations§
impl Freeze for InterpolationMode
impl RefUnwindSafe for InterpolationMode
impl Send for InterpolationMode
impl Sync for InterpolationMode
impl Unpin for InterpolationMode
impl UnsafeUnpin for InterpolationMode
impl UnwindSafe for InterpolationMode
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more