Struct las::Writer [] [src]

pub struct Writer<W: Seek + Write> {
    // some fields omitted
}

Write LAS points to a Write.

This struct implements Drop, so the LAS data are finalized (the header is re-written) when the Writer goes out of scope. This will panic if there is an error while closing the file, so if you're worried about panics you will need to use Writer::close instead.

Methods

impl<W: Seek + Write> Writer<W>
[src]

Creates a new default writer.

Examples

use std::io::Cursor;
let writer = Writer::default(Cursor::new(Vec::new())).unwrap();

Writes a point.

Examples

use std::io::Cursor;
let mut writer = Writer::default(Cursor::new(Vec::new())).unwrap();
writer.write(Default::default()).unwrap();

Closes this writer.

After the writer is closed, and future calls to write will error.

Examples

use std::io::Cursor;
let mut writer = Writer::default(Cursor::new(Vec::new())).unwrap();
assert!(writer.write(Default::default()).is_ok());
writer.close().unwrap();
assert!(writer.write(Default::default()).is_err());

Trait Implementations

impl<W: Debug + Seek + Write> Debug for Writer<W>
[src]

Formats the value using the given formatter.

impl<W: Seek + Write> Drop for Writer<W>
[src]

A method called when the value goes out of scope. Read more