cityjson 0.7.1

Types and accessor methods for representing semantic 3D city models in Rust, implementing the CityJSON specifications.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//! Traits for raw data access.

use crate::raw::views::{RawPoolView, RawSliceView};

/// Trait for types that expose their internals for zero-copy serialization.
pub trait RawAccess {
    type Vertex;
    type Geometry;
    type Semantic;
    type Material;
    type Texture;

    fn vertices_raw(&self) -> RawSliceView<'_, Self::Vertex>;
    fn geometries_raw(&self) -> RawPoolView<'_, Self::Geometry>;
    fn semantics_raw(&self) -> RawPoolView<'_, Self::Semantic>;
    fn materials_raw(&self) -> RawPoolView<'_, Self::Material>;
    fn textures_raw(&self) -> RawPoolView<'_, Self::Texture>;
}