Enum sdc::point::TargetType [] [src]

pub enum TargetType {
    CenterOfGravity,
    Parabola,
    Gaussian,
    Peak,
}

How the point was derived from a waveform.

Variants

CenterOfGravity
Parabola
Gaussian
Peak

Methods

impl TargetType

fn as_u8(&self) -> u8

Returns this target type as a u8.

Examples

use sdc::point::TargetType;
assert_eq!(0, TargetType::CenterOfGravity.as_u8());
assert_eq!(1, TargetType::Parabola.as_u8());
assert_eq!(2, TargetType::Gaussian.as_u8());

fn from_u8(n: u8) -> Result<TargetType>

Returns the target type for this u8.

Examples

use sdc::point::TargetType;
assert_eq!(TargetType::Peak, TargetType::from_u8(3).unwrap());
assert!(TargetType::from_u8(10).is_err());

Trait Implementations

impl Default for TargetType

fn default() -> TargetType

Derived Implementations

impl PartialEq for TargetType

fn eq(&self, __arg_0: &TargetType) -> bool

fn ne(&self, __arg_0: &TargetType) -> bool

impl Debug for TargetType

fn fmt(&self, __arg_0: &mut Formatter) -> Result

impl Copy for TargetType

impl Clone for TargetType

fn clone(&self) -> TargetType

fn clone_from(&mut self, source: &Self)