Struct las::header::PointDataFormat [] [src]

pub struct PointDataFormat(_);

A wrapper around the u8 of a point data format.

Formats have powers, so we encapsulate that through this struct.

Methods

impl PointDataFormat

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

Creates a point data format for this u8.

Examples

use las::header::PointDataFormat;
assert!(PointDataFormat::from_u8(0).is_ok());
assert!(PointDataFormat::from_u8(1).is_ok());
assert!(PointDataFormat::from_u8(127).is_err());

fn has_time(&self) -> bool

Returns true if this point data format has time.

Examples

use las::header::PointDataFormat;
assert!(!PointDataFormat::from_u8(0).unwrap().has_time());
assert!(PointDataFormat::from_u8(1).unwrap().has_time());

fn has_color(&self) -> bool

Returns true if this point data format has color.

Examples

use las::header::PointDataFormat;
assert!(!PointDataFormat::from_u8(0).unwrap().has_color());
assert!(PointDataFormat::from_u8(2).unwrap().has_color());

fn record_length(&self) -> u16

Returns the record length for this point data format.

Examples

use las::header::PointDataFormat;
assert_eq!(20, PointDataFormat::from_u8(0).unwrap().record_length());

Trait Implementations

impl Display for PointDataFormat

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

Derived Implementations

impl PartialEq for PointDataFormat

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

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

impl Debug for PointDataFormat

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

impl Copy for PointDataFormat

impl Clone for PointDataFormat

fn clone(&self) -> PointDataFormat

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