Skip to main content

LayoutStrategy

Trait LayoutStrategy 

Source
pub trait LayoutStrategy<T>: Send + Sync {
    // Required method
    fn layout(
        &self,
        items: &[T],
        mapper: &dyn DimensionMapper<Item = T>,
    ) -> LayoutResult<T>;
}
Expand description

A layout algorithm that assigns positions on S² to a set of items.

Required Methods§

Source

fn layout( &self, items: &[T], mapper: &dyn DimensionMapper<Item = T>, ) -> LayoutResult<T>

Computes positions for all items using mapper to derive their natural positions.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§