I want to use two external libraries (geo-types-0.6.0 and geo-offset-0.1.0) to perform geometric algorithms.
The example below seems fine:
The Line type is defined in the library geo_types.
The Offset trait moreover is written in geo_offset. Including this trait should lead to the Line type implementing method offset.
However I get the following error:
no method named `offset` found for struct `geo_types::line::Line<float>` in the current scope
In addition to that, the rust-analyzer in VS Code tells me, that the included trait Offset is not used. Why is that?
use geo_types::{Coordinate, Line};
use geo_offset::Offset;
let line = Line::new(
Coordinate { x: 0.0, y: 0.0 },
Coordinate { x: 1.0, y: 8.0 },
);
let line_with_offset = line.offset(2.0)?;