@@ -14,25 +14,25 @@ drawing_area.fill(&WHITE).unwrap();
14
14
let mut chart_builder = ChartBuilder::on(&drawing_area);
15
15
let mut chart_context = chart_builder.margin(20).build_cartesian_3d(0.0..3.5, 0.0..2.5, 0.0..1.5).unwrap();
16
16
chart_context.configure_axes().x_labels(4).y_labels(3).z_labels(2).draw().unwrap();
17
- let cubiod = Cubiod ::new([(0.,0.,0.), (3.,2.,1.)], BLUE.mix(0.2), BLUE);
18
- chart_context.draw_series(std::iter::once(cubiod )).unwrap();
17
+ let cuboid = Cuboid ::new([(0.,0.,0.), (3.,2.,1.)], BLUE.mix(0.2), BLUE);
18
+ chart_context.draw_series(std::iter::once(cuboid )).unwrap();
19
19
```
20
20
21
21
The result is a semi-transparent cuboid with blue edges:
22
22
23
23

24
24
*/
25
- pub struct Cubiod < X , Y , Z > {
25
+ pub struct Cuboid < X , Y , Z > {
26
26
face_style : ShapeStyle ,
27
27
edge_style : ShapeStyle ,
28
28
vert : [ ( X , Y , Z ) ; 8 ] ,
29
29
}
30
30
31
- impl < X : Clone , Y : Clone , Z : Clone > Cubiod < X , Y , Z > {
31
+ impl < X : Clone , Y : Clone , Z : Clone > Cuboid < X , Y , Z > {
32
32
/**
33
33
Creates a cuboid.
34
34
35
- See [`Cubiod `] for more information and examples.
35
+ See [`Cuboid `] for more information and examples.
36
36
*/
37
37
#[ allow( clippy:: redundant_clone) ]
38
38
pub fn new < FS : Into < ShapeStyle > , ES : Into < ShapeStyle > > (
@@ -58,7 +58,7 @@ impl<X: Clone, Y: Clone, Z: Clone> Cubiod<X, Y, Z> {
58
58
}
59
59
60
60
impl < ' a , X : ' a , Y : ' a , Z : ' a > PointCollection < ' a , ( X , Y , Z ) , BackendCoordAndZ >
61
- for & ' a Cubiod < X , Y , Z >
61
+ for & ' a Cuboid < X , Y , Z >
62
62
{
63
63
type Point = & ' a ( X , Y , Z ) ;
64
64
type IntoIter = & ' a [ ( X , Y , Z ) ] ;
@@ -67,7 +67,7 @@ impl<'a, X: 'a, Y: 'a, Z: 'a> PointCollection<'a, (X, Y, Z), BackendCoordAndZ>
67
67
}
68
68
}
69
69
70
- impl < X , Y , Z , DB : DrawingBackend > Drawable < DB , BackendCoordAndZ > for Cubiod < X , Y , Z > {
70
+ impl < X , Y , Z , DB : DrawingBackend > Drawable < DB , BackendCoordAndZ > for Cuboid < X , Y , Z > {
71
71
fn draw < I : Iterator < Item = ( BackendCoord , i32 ) > > (
72
72
& self ,
73
73
points : I ,
@@ -106,3 +106,7 @@ impl<X, Y, Z, DB: DrawingBackend> Drawable<DB, BackendCoordAndZ> for Cubiod<X, Y
106
106
Ok ( ( ) )
107
107
}
108
108
}
109
+
110
+ #[ deprecated( note = "Use Cuboid instead." ) ]
111
+ /// Use [`Cuboid`] instead. This type definition is only for backward-compatibility.
112
+ pub type Cubiod < X , Y , Z > = Cuboid < X , Y , Z > ;
0 commit comments