[−][src]Struct las::Version
LAS version.
Defaults to 1.2.
Fields
major: u8
The major version.
Should always be 1.
minor: u8
The minor version.
Should be between 0 and 4.
Implementations
impl Version
[src]
pub fn new(major: u8, minor: u8) -> Version
[src]
Creates a new version.
Doesn't do any checking that its an actual las version
Examples
use las::Version; let version = Version::new(1, 2);
pub fn requires_point_data_start_signature(&self) -> bool
[src]
Does this version require the point data start signature?
Only 1.0 does.
use las::Version; assert!(Version::new(1, 0).requires_point_data_start_signature()); assert!(!Version::new(1, 1).requires_point_data_start_signature());
pub fn header_size(&self) -> u16
[src]
Returns this version's header size.
Examples
use las::Version; assert_eq!(227, Version::new(1, 2).header_size()); assert_eq!(235, Version::new(1, 3).header_size()); assert_eq!(375, Version::new(1, 4).header_size());
pub fn verify_support_for<F: Feature>(&self) -> Result<()>
[src]
Checks whether this version supports the feature, returning an error if not.
Examples
use las::Version; use las::feature::Waveforms; Version::new(1, 4).verify_support_for::<Waveforms>().unwrap(); assert!(Version::new(1, 2).verify_support_for::<Waveforms>().is_err());
pub fn supports<F: Feature>(&self) -> bool
[src]
Checks whether this version supports the feature.
Examples
use las::Version; use las::feature::Waveforms; assert!(Version::new(1, 4).supports::<Waveforms>()); assert!(!Version::new(1, 2).supports::<Waveforms>());
pub fn supports_point_format(&self, format: Format) -> bool
[src]
Checks whether this version supports the given point format.
Examples
use las::Version; use las::point::Format; let las_1_2 = Version::new(1, 2); let las_1_4 = Version::new(1, 4); assert!(las_1_2.supports_point_format(Format::new(3).unwrap())); assert!(!las_1_2.supports_point_format(Format::new(4).unwrap())); assert!(las_1_4.supports_point_format(Format::new(4).unwrap()));
Trait Implementations
impl Clone for Version
[src]
impl Copy for Version
[src]
impl Debug for Version
[src]
impl Default for Version
[src]
impl Display for Version
[src]
impl Eq for Version
[src]
impl From<(u8, u8)> for Version
[src]
impl From<Version> for (u8, u8)
[src]
impl Ord for Version
[src]
fn cmp(&self, other: &Version) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[src]
impl PartialEq<Version> for Version
[src]
impl PartialOrd<Version> for Version
[src]
fn partial_cmp(&self, other: &Version) -> Option<Ordering>
[src]
fn lt(&self, other: &Version) -> bool
[src]
fn le(&self, other: &Version) -> bool
[src]
fn gt(&self, other: &Version) -> bool
[src]
fn ge(&self, other: &Version) -> bool
[src]
impl StructuralEq for Version
[src]
impl StructuralPartialEq for Version
[src]
Auto Trait Implementations
impl RefUnwindSafe for Version
impl Send for Version
impl Sync for Version
impl Unpin for Version
impl UnwindSafe for Version
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,