#[non_exhaustive]pub struct MapConnection<M: MapTrait> {
pub direction: Direction,
pub target_map: M,
pub offset: i8,
}Expand description
A single map connection (e.g., north exit leads to Route 1).
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.direction: Direction§target_map: M§offset: i8Offset in blocks for alignment when crossing the boundary.
Implementations§
Trait Implementations§
Source§impl<M: Clone + MapTrait> Clone for MapConnection<M>
impl<M: Clone + MapTrait> Clone for MapConnection<M>
Source§fn clone(&self) -> MapConnection<M>
fn clone(&self) -> MapConnection<M>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'de, M> Deserialize<'de> for MapConnection<M>where
M: Deserialize<'de> + MapTrait,
impl<'de, M> Deserialize<'de> for MapConnection<M>where
M: Deserialize<'de> + MapTrait,
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
impl<M: Eq + MapTrait> Eq for MapConnection<M>
Source§impl<M> Serialize for MapConnection<M>
impl<M> Serialize for MapConnection<M>
impl<M: PartialEq + MapTrait> StructuralPartialEq for MapConnection<M>
Auto Trait Implementations§
impl<M> Freeze for MapConnection<M>where
M: Freeze,
impl<M> RefUnwindSafe for MapConnection<M>where
M: RefUnwindSafe,
impl<M> Send for MapConnection<M>where
M: Send,
impl<M> Sync for MapConnection<M>where
M: Sync,
impl<M> Unpin for MapConnection<M>where
M: Unpin,
impl<M> UnsafeUnpin for MapConnection<M>where
M: UnsafeUnpin,
impl<M> UnwindSafe for MapConnection<M>where
M: UnwindSafe,
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