#[non_exhaustive]pub struct WarpPoint<M: MapTrait> {
pub x: u8,
pub y: u8,
pub target_map: M,
pub target_warp_id: u8,
pub is_last_map: bool,
}Expand description
A warp point within a map (door, staircase, etc.).
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.x: u8Position in the map (block coordinates).
y: u8§target_map: MTarget map to warp to.
target_warp_id: u8Index of the target warp in the destination map.
is_last_map: boolWhether this warp sends the player back to the last-visited map.
Implementations§
Trait Implementations§
Source§impl<'de, M> Deserialize<'de> for WarpPoint<M>where
M: Deserialize<'de> + MapTrait,
impl<'de, M> Deserialize<'de> for WarpPoint<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 WarpPoint<M>
impl<M: PartialEq + MapTrait> StructuralPartialEq for WarpPoint<M>
Auto Trait Implementations§
impl<M> Freeze for WarpPoint<M>where
M: Freeze,
impl<M> RefUnwindSafe for WarpPoint<M>where
M: RefUnwindSafe,
impl<M> Send for WarpPoint<M>where
M: Send,
impl<M> Sync for WarpPoint<M>where
M: Sync,
impl<M> Unpin for WarpPoint<M>where
M: Unpin,
impl<M> UnsafeUnpin for WarpPoint<M>where
M: UnsafeUnpin,
impl<M> UnwindSafe for WarpPoint<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