pub struct EditRoad {
pub lanes_ltr: Vec<LaneSpec>,
pub speed_limit: Speed,
pub access_restrictions: AccessRestrictions,
}
Fields
lanes_ltr: Vec<LaneSpec>
speed_limit: Speed
access_restrictions: AccessRestrictions
Implementations
sourceimpl EditRoad
impl EditRoad
pub fn get_orig_from_osm(r: &Road, cfg: &MapConfig) -> EditRoad
fn diff(&self, other: &EditRoad) -> Vec<String>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
sourcepub fn create_for_test(input_lt: &str, input_dir: &str) -> EditRoad
pub fn create_for_test(input_lt: &str, input_dir: &str) -> EditRoad
Transforms a string describing lane types and directions, like “spddps” and “vv^^^^^”, into an EditRoad. Useful for unit tests.
sourcepub fn check_lanes_ltr(
&self,
description: String,
input_lt: &str,
input_dir: &str,
expected_lt: &str,
expected_dir: &str,
ok: &mut bool
)
pub fn check_lanes_ltr(
&self,
description: String,
input_lt: &str,
input_dir: &str,
expected_lt: &str,
expected_dir: &str,
ok: &mut bool
)
This is meant for table-driven unit tests. Call this on the transformed / output lanes. If
the lanes don’t match, ok
will be set to false and appropriate errors will be printed.
Trait Implementations
sourceimpl<'de> Deserialize<'de> for EditRoad
impl<'de> Deserialize<'de> for EditRoad
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
impl StructuralPartialEq for EditRoad
Auto Trait Implementations
impl RefUnwindSafe for EditRoad
impl Send for EditRoad
impl Sync for EditRoad
impl Unpin for EditRoad
impl UnwindSafe for EditRoad
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub 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
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more