Struct sdc::writer::Writer [] [src]

pub struct Writer<W: Write> { /* fields omitted */ }

An .sdc writer.

Methods

impl Writer<BufWriter<File>>
[src]

Creates a new SDC file and opens it for writing.

The file will be closed when the file goes out of scope.

Examples

use std::fs::remove_file;
use sdc::writer::Writer;
{
    let writer = Writer::from_path("temp.sdc").unwrap();
}
remove_file("temp.sdc").unwrap();

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

Creates a new writer, consuming the provided Write.

Examples

use std::fs::File;
use sdc::writer::Writer;
let writer = File::create("temp.sdc").unwrap();
{
    let writer = Writer::new(writer).unwrap();
}

Writes a point to this SDC file.

Examples

use sdc::writer::Writer;
use sdc::point::Point;
let ref point = Point::new();
{
    let mut file = Writer::from_path("temp.sdc").unwrap();
    file.write_point(point).unwrap();
}

Trait Implementations

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

Formats the value using the given formatter.