pub trait Geom {
// Required method
fn size(&self) -> Size;
// Provided methods
fn row(&self) -> i32 { ... }
fn column(&self) -> i32 { ... }
fn cell_len(&self) -> usize { ... }
fn contains(&self, p: Point) -> bool { ... }
fn point_to_cellid(&self, p: Point) -> CellId { ... }
fn cellid_to_point(&self, id: CellId) -> Point { ... }
fn points(&self) -> Points ⓘ { ... }
fn points_in_row(&self, row: i32) -> PointsInRow ⓘ { ... }
fn points_in_column(&self, column: i32) -> PointsInColumn ⓘ { ... }
}Expand description
A rectangle area.
Required Methods§
Provided Methods§
Sourcefn point_to_cellid(&self, p: Point) -> CellId
fn point_to_cellid(&self, p: Point) -> CellId
Convert a point to a corresponding cell ID.
Sourcefn cellid_to_point(&self, id: CellId) -> Point
fn cellid_to_point(&self, id: CellId) -> Point
Convert a cell ID to a corresponding point.
Sourcefn points_in_row(&self, row: i32) -> PointsInRow ⓘ
fn points_in_row(&self, row: i32) -> PointsInRow ⓘ
Returns an iterator iterating all points in the row.
Sourcefn points_in_column(&self, column: i32) -> PointsInColumn ⓘ
fn points_in_column(&self, column: i32) -> PointsInColumn ⓘ
Returns an iterator iterating all points in the column.