pub trait PartSource {
// Required methods
fn plan(
&mut self,
world: &World,
boxes: &dyn Fn(Entity) -> Option<[[f64; 3]; 2]>,
) -> Result<()>;
fn next_part(&mut self) -> Result<Option<Part>>;
// Provided methods
fn written(&mut self, _part: &World) -> Result<()> { ... }
fn restart(&mut self) -> Result<()> { ... }
}Expand description
How a conversion divides the selected world into parts.
Required Methods§
Provided Methods§
Sourcefn written(&mut self, _part: &World) -> Result<()>
fn written(&mut self, _part: &World) -> Result<()>
The part just asked for, as the writer got it: for a source that refines its plan from loaded geometry.
Sourcefn restart(&mut self) -> Result<()>
fn restart(&mut self) -> Result<()>
Give the same parts again, from the first, as planned (convert_parts_summarized goes over them twice). A
source that cannot (its parts depend on what was written) refuses.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".