[−][src]Struct bracket_lib::prelude::XpLayer
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
Methods
impl XpLayer
[src]
pub fn new(width: usize, height: usize) -> XpLayer
[src]
Construct a new XpLayer of width by height. The contents will be empty (black foreground and background, character 0).
pub fn get(&self, x: usize, y: usize) -> Option<&XpCell>
[src]
Get the cell at coordinates (x,y), or None if it is out of range.
pub fn get_mut(&mut self, x: usize, y: usize) -> Option<&mut XpCell>
[src]
Get mutable reference to the cell at coordinates (x,y), or None if it is out of range.
Trait Implementations
impl Clone for XpLayer
[src]
impl Debug for XpLayer
[src]
impl PartialEq<XpLayer> for XpLayer
[src]
impl StructuralPartialEq for XpLayer
[src]
Auto Trait Implementations
impl RefUnwindSafe for XpLayer
impl Send for XpLayer
impl Sync for XpLayer
impl Unpin for XpLayer
impl UnwindSafe for XpLayer
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,