pub trait Geometry: Clone {
// Required methods
fn init_view(&self, view: &mut GeometryView);
fn update_view(&self, view: &mut GeometryView);
// Provided method
fn update(&mut self) { ... }
}Expand description
A trait for objects that can both initialize and update a GeometryView.
Types implementing this trait can:
- Create a complete geometry view from scratch
- Modify an existing geometry view
- Are cloneable to support duplication of geometric data.
§Required Trait Bounds
Clone: For copying geometric data
Required Methods§
Sourcefn init_view(&self, view: &mut GeometryView)
fn init_view(&self, view: &mut GeometryView)
Initializes a new GeometryView.
Sourcefn update_view(&self, view: &mut GeometryView)
fn update_view(&self, view: &mut GeometryView)
Updates an existing GeometryView with this object’s data.
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.