Struct las::vlr::Vlr [] [src]

pub struct Vlr {
    pub reserved: u16,
    pub user_id: [u8; 16],
    pub record_id: u16,
    pub record_length_after_header: u16,
    pub description: [u8; 32],
    pub record: Vec<u8>,
}

A variable length record

Fields

reserved

Reserved for future use.

user_id

ASCII data that identifies the record.

record_id

Integer id for this record type.

record_length_after_header

The number of bytes in the actual record data.

description

A textual description of this record.

record

The record data themselves.

Methods

impl Vlr

fn read_from<R: Read>(reader: &mut R) -> Result<Vlr>

Reads a Vlr from a Read.

Examples

use std::fs::File;
use std::io::{Seek, SeekFrom};
use las::header::Header;
use las::vlr::Vlr;
let ref mut reader = File::open("data/1.0_0.las").unwrap();
let header = Header::read_from(reader).unwrap();
reader.seek(SeekFrom::Start(header.header_size as u64)).unwrap();
let vlr = Vlr::read_from(reader);

fn new() -> Vlr

Creates a new, empty Vlr.

Examples

use las::vlr::Vlr;
let vlr = Vlr::new();

fn len(&self) -> u32

Returns the length of this variable length record in bytes.

Examples

use las::vlr::Vlr;
let vlr = Vlr::new();
assert_eq!(54, vlr.len());

fn write_to<W: Write>(&self, writer: &mut W) -> Result<u32>

Writes this vlr to a Write.

Examples

use std::io::Cursor;
use las::vlr::Vlr;
let vlr = Vlr::new();
let ref mut writer = Cursor::new(Vec::new());
vlr.write_to(writer).unwrap();

Trait Implementations

Derived Implementations

impl PartialEq for Vlr

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

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

impl Debug for Vlr

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

impl Clone for Vlr

fn clone(&self) -> Vlr

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