pub struct XpLayer {
pub width: usize,
pub height: usize,
pub cells: Vec<XpCell>,
}
Expand description
Structure representing a layer Cells are in the same order as in the file, in column-major order (index of position x,y is y*height + x).
Fields§
§width: usize
Width of layer (in cells)
height: usize
Height of layer (in cells)
cells: Vec<XpCell>
Content of layer
Implementations§
Source§impl XpLayer
impl XpLayer
Sourcepub fn new(width: usize, height: usize) -> XpLayer
pub fn new(width: usize, height: usize) -> XpLayer
Construct a new XpLayer of width by height. The contents will be empty (black foreground and background, character 0).
Trait Implementations§
impl StructuralPartialEq for XpLayer
Auto Trait Implementations§
impl Freeze for XpLayer
impl RefUnwindSafe for XpLayer
impl Send for XpLayer
impl Sync for XpLayer
impl Unpin for XpLayer
impl UnwindSafe for XpLayer
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