#[repr(transparent)]pub struct YMajor<T>(pub [[T; 50]; 50]);
Expand description
A wrapper struct indicating that the inner array should be indexed Y major, i.e. ``` use screeps::{ constants::ROOM_USIZE, local::{YMajor, XY}, };
let mut y_major = YMajor([[0_u8; ROOM_USIZE]; ROOM_USIZE]); y_major.0[0][10] = 1; let xy = RoomXY::checked_new(10, 0).unwrap(); assert_eq!(y_major[xy], 1);
Tuple Fields§
§0: [[T; 50]; 50]
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for YMajor<T>where
T: Freeze,
impl<T> RefUnwindSafe for YMajor<T>where
T: RefUnwindSafe,
impl<T> Send for YMajor<T>where
T: Send,
impl<T> Sync for YMajor<T>where
T: Sync,
impl<T> Unpin for YMajor<T>where
T: Unpin,
impl<T> UnwindSafe for YMajor<T>where
T: 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