pub struct Brouter { /* private fields */ }
Expand description
A client for the BRouter server
Implementations§
Source§impl Brouter
impl Brouter
Sourcepub fn local() -> Result<Self, Box<dyn Error>>
pub fn local() -> Result<Self, Box<dyn Error>>
Run the BRouter server locally and connect to it
Sourcepub fn upload_profile(&self, profile: &str, data: Vec<u8>) -> Result<(), Error>
pub fn upload_profile(&self, profile: &str, data: Vec<u8>) -> Result<(), Error>
Upload a profile to the BRouter server
Sourcepub fn broute(
&self,
points: &[Point],
nogos: &[Nogo],
profile: &str,
alternativeidx: Option<u8>,
timode: Option<TurnInstructionMode>,
name: Option<&str>,
export_waypoints: bool,
) -> Result<Gpx, Error>
pub fn broute( &self, points: &[Point], nogos: &[Nogo], profile: &str, alternativeidx: Option<u8>, timode: Option<TurnInstructionMode>, name: Option<&str>, export_waypoints: bool, ) -> Result<Gpx, Error>
Route between the given points
§Arguments
points
- A list of points to route betweennogos
- A list of nogos to avoidprofile
- The profile to use for routingalternativeidx
- The index of the alternative route to usetimode
- The mode for turn instructionsname
- The name of the routeexport_waypoints
- Whether to export waypoints
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Brouter
impl !RefUnwindSafe for Brouter
impl Send for Brouter
impl Sync for Brouter
impl Unpin for Brouter
impl !UnwindSafe for Brouter
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