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§
- Deserialize
Error - Error that occurs during PLY deserialization.
- Element
Def - Definition of a PLY element type.
- List
Count U16 - Wrapper to serialize PLY lists with
u16count type. - List
Count U32 - Wrapper to serialize PLY lists with
u32count type. - PlyChunked
Reader - 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.
- Serialize
Error - Error that occurs during PLY serialization.
- Serialize
Options - Options for PLY file serialization.
Enums§
- PlyFormat
- PLY file format encoding.
- Property
Type - PLY property type definition.
- Scalar
Type - 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.