Struct synthpop::external::ExternalPerson
source · [−]pub struct ExternalPerson {
pub trips: Vec<ExternalTrip>,
}
Fields
trips: Vec<ExternalTrip>
Implementations
sourceimpl 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
sourceimpl<'de> Deserialize<'de> for ExternalPerson
impl<'de> Deserialize<'de> for ExternalPerson
sourcefn 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 RefUnwindSafe for ExternalPerson
impl Send for ExternalPerson
impl Sync for ExternalPerson
impl Unpin for ExternalPerson
impl UnwindSafe for ExternalPerson
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
type Output = T
Should always be Self