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
[src]
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, Error>
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 Clone for TargetType
[src]
fn clone(&self) -> TargetType
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl Copy for TargetType
[src]
impl Debug for TargetType
[src]
impl PartialEq for TargetType
[src]
fn eq(&self, __arg_0: &TargetType) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.
impl Default for TargetType
[src]
fn default() -> TargetType
Returns the "default value" for a type. Read more