Trait geo::algorithm::convert::TryConvert
source · pub trait TryConvert<T, U> {
type Output;
// Required method
fn try_convert(&self) -> Self::Output;
}
Expand description
Convert (fallibly) the type of a geometry’s coordinate value.
Examples
use geo::{TryConvert, LineString, line_string};
let line_string_64: LineString<i64> = line_string![
(x: 5, y: 10),
(x: 3, y: 1),
(x: 8, y: 9),
];
let line_string_32: Result<LineString<i32>, _> = line_string_64.try_convert();