[−][src]Struct las::vlr::Vlr
A variable length record.
Fields
user_id: String
The user that created this record.
This value is often an official, "registered" user_id, such as "LASF_Spec" or "LASF_Projection".
record_id: u16
This value specifies the type of record, and depends on the user id.
description: String
Textual description of these data.
data: Vec<u8>
The data themselves.
Implementations
impl Vlr
[src]
pub fn new(raw_vlr: Vlr) -> Vlr
[src]
Creates a vlr from a raw vlr.
Examples
use las::{Vlr, raw}; let raw_vlr = raw::Vlr::default(); let vlr = Vlr::new(raw_vlr);
pub fn into_raw(self, is_extended: bool) -> Result<Vlr>
[src]
Converts this vlr to a raw vlr.
Examples
use las::Vlr; let raw_vlr = Vlr::default().into_raw(false).unwrap(); let raw_evlr = Vlr::default().into_raw(true).unwrap();
pub fn len(&self, is_extended: bool) -> usize
[src]
Returns the total length of this vlr, header and data.
Examples
use las::Vlr; let mut vlr = Vlr::default(); assert_eq!(54, vlr.len(false)); assert_eq!(60, vlr.len(true)); vlr.data = vec![0]; assert_eq!(55, vlr.len(false));
pub fn is_empty(&self) -> bool
[src]
Returns true if the data of this vlr is empty.
Examples
use las::Vlr; let mut vlr = Vlr::default(); assert!(vlr.is_empty()); vlr.data = vec![42]; assert!(!vlr.is_empty());
pub fn has_large_data(&self) -> bool
[src]
Returns true if this vlr must be extended due to large data size.
Examples
use las::Vlr; use std::u16; let mut vlr = Vlr::default(); assert!(!vlr.has_large_data()); vlr.data = vec![0; u16::MAX as usize + 1 ]; assert!(vlr.has_large_data());
Trait Implementations
impl Clone for Vlr
[src]
impl Debug for Vlr
[src]
impl Default for Vlr
[src]
impl PartialEq<Vlr> for Vlr
[src]
impl StructuralPartialEq for Vlr
[src]
Auto Trait Implementations
impl RefUnwindSafe for Vlr
impl Send for Vlr
impl Sync for Vlr
impl Unpin for Vlr
impl UnwindSafe for Vlr
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, 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>,