pub struct PointHandler;Expand description
Point coordinate validator.
Accepts [lat,lon], lat,lon, and (lat,lon) input.
Implementations§
Source§impl PointHandler
impl PointHandler
pub fn validate_and_canonicalize( value: &str, field_name: &str, ) -> Result<String>
Sourcepub fn validate_json_and_canonicalize(
value: &Value,
field_name: &str,
) -> Result<Value>
pub fn validate_json_and_canonicalize( value: &Value, field_name: &str, ) -> Result<Value>
Validate a JSON point value and return canonical [lat,lon] JSON.
Sourcepub fn parse_point_value(value: &Value) -> Result<Coordinate>
pub fn parse_point_value(value: &Value) -> Result<Coordinate>
Parse a JSON point array or a compatible legacy point string.
pub fn parse_point_coordinates(value: &str) -> Result<(f64, f64)>
Auto Trait Implementations§
impl Freeze for PointHandler
impl RefUnwindSafe for PointHandler
impl Send for PointHandler
impl Sync for PointHandler
impl Unpin for PointHandler
impl UnsafeUnpin for PointHandler
impl UnwindSafe for PointHandler
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more