Struct synthpop::external::ExternalPerson
source · pub struct ExternalPerson {
pub trips: Vec<ExternalTrip>,
}
Fields§
§trips: Vec<ExternalTrip>
Implementations§
source§impl ExternalPerson
impl ExternalPerson
sourcepub fn import(
map: &Map,
input: Vec<ExternalPerson>,
skip_problems: bool
) -> Result<Vec<PersonSpec>>
pub fn import( map: &Map, input: Vec<ExternalPerson>, skip_problems: bool ) -> Result<Vec<PersonSpec>>
Import external scenario data. The main difference between ExternalPerson
and
PersonSpec
is a way to specify endpoints by a LonLat
. This is snapped to the nearest
building. If the point is outside of the map boundary, it’s snapped to the nearest border
(by Euclidean distance – the network outside the given map isn’t known). Failure happens
if a point is within the map, but not close enough to any buildings. If skip_problems
is
true, then those failures are logged; otherwise this panics at the first problem.
Trait Implementations§
source§impl<'de> Deserialize<'de> for ExternalPerson
impl<'de> Deserialize<'de> for ExternalPerson
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ExternalPerson
impl RefUnwindSafe for ExternalPerson
impl Send for ExternalPerson
impl Sync for ExternalPerson
impl Unpin for ExternalPerson
impl UnwindSafe for ExternalPerson
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