Skip to main content

Measured3d

Trait Measured3d 

Source
pub trait Measured3d {
    // Required methods
    fn area(&self) -> f32;
    fn volume(&self) -> f32;
}
Expand description

A trait for getting measurements of 3D shapes

Required Methods§

Source

fn area(&self) -> f32

Get the surface area of the shape

Source

fn volume(&self) -> f32

Get the volume of the shape

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§