1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
// SPDX-License-Identifier: Apache-2.0
// SPDX-FileCopyrightText: 2026 Torgeir Børresen <tb@starkad.no>
// Rust port of Google's S2 Geometry library — a derivative work, modified from
// the upstream Apache-2.0 source(s) below (Copyright Google Inc.). See LICENSE.
// - C++: google/s2geometry
// - Java: google/s2-geometry-library-java
// Layer trait for S2Builder.
//
// A Layer receives an assembled Graph and produces output geometry.
use S2Error;
use ;
/// A label attached to input edges.
pub type Label = Label;
/// Predicate that determines whether a polygon graph represents
/// the full polygon (the entire sphere).
pub type IsFullPolygonPredicate =
Arc;
/// A layer receives an assembled Graph from `S2Builder` and produces
/// output geometry (points, polylines, polygons, etc.).
///
/// After `S2Builder::build()` completes, layers are returned to the caller
/// who can downcast them via [`Layer::into_any`] or use the concrete type's
/// `into_output()` method to extract the built geometry.