Crate serde_ply

Crate serde_ply 

Source
Expand description

Serde-based PLY file format serialization and deserialization.

This crate provides fast, flexible PLY file parsing and writing using serde. It supports both ASCII and binary formats, streaming/chunked processing, and the full PLY specification including list properties.

§Quick Start

use serde::{Deserialize, Serialize};
use serde_ply::{from_str, to_string, SerializeOptions};

#[derive(Deserialize, Serialize)]
struct Vertex {
    x: f32,
    y: f32,
    z: f32,
}

#[derive(Deserialize, Serialize)]
struct Mesh {
    vertex: Vec<Vertex>,
}

let ply_text = r#"ply
format ascii 1.0
element vertex 2
property float x
property float y
property float z
end_header
0.0 0.0 0.0
1.0 1.0 1.0
"#;

let mesh: Mesh = from_str(ply_text)?;
let output = to_string(&mesh, SerializeOptions::ascii())?;

Structs§

DeserializeError
Error that occurs during PLY deserialization.
ElementDef
Definition of a PLY element type.
ListCountU16
Wrapper to serialize PLY lists with u16 count type.
ListCountU32
Wrapper to serialize PLY lists with u32 count type.
PlyChunkedReader
Streaming PLY file parser for chunked data processing.
PlyHeader
PLY file header containing format, elements, and metadata.
PlyProperty
Definition of a single property within a PLY element.
PlyReader
PLY file deserializer for element-by-element processing.
RowVisitor
Visitor for processing PLY rows one at a time.
SerializeError
Error that occurs during PLY serialization.
SerializeOptions
Options for PLY file serialization.

Enums§

PlyFormat
PLY file format encoding.
PropertyType
PLY property type definition.
ScalarType
Scalar data type used in PLY properties.

Functions§

from_bytes
Deserialize PLY data from bytes.
from_reader
Deserialize PLY data from a reader.
from_str
Deserialize PLY data from a string.
to_bytes
Serialize PLY data to bytes.
to_string
Serialize PLY data to a string.
to_writer
Serialize PLY data to a writer.