Fix builder requiring fields that are optional/have defaults
This commit is contained in:
parent
11412a7ff9
commit
f64e8d99cd
|
@ -83,15 +83,16 @@ pub enum ParseError {
|
||||||
#[derive(Builder, Copy, Clone, Debug, Default)]
|
#[derive(Builder, Copy, Clone, Debug, Default)]
|
||||||
pub struct GeoUri {
|
pub struct GeoUri {
|
||||||
/// The coordinate reference system used by the coordinates of this URI.
|
/// The coordinate reference system used by the coordinates of this URI.
|
||||||
|
#[builder(default)]
|
||||||
pub crs_id: CrsId,
|
pub crs_id: CrsId,
|
||||||
/// The latitude coordinate of a location.
|
/// The latitude coordinate of a location.
|
||||||
pub latitude: f64,
|
pub latitude: f64,
|
||||||
/// The longitude coordinate of a location.
|
/// The longitude coordinate of a location.
|
||||||
pub longitude: f64,
|
pub longitude: f64,
|
||||||
/// The altitude coordinate of a location, if provided.
|
/// The altitude coordinate of a location, if provided.
|
||||||
#[builder(setter(strip_option))]
|
#[builder(default, setter(strip_option))]
|
||||||
pub altitude: Option<f64>,
|
pub altitude: Option<f64>,
|
||||||
#[builder(setter(strip_option))]
|
#[builder(default, setter(strip_option))]
|
||||||
/// The uncertainty around the location as a radius (distance) in meters.
|
/// The uncertainty around the location as a radius (distance) in meters.
|
||||||
pub uncertainty: Option<u32>,
|
pub uncertainty: Option<u32>,
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue