pub struct Indexer { /* private fields */ }Implementations§
Source§impl Indexer
impl Indexer
pub fn new(width: impl AsPrimitive<i64>, height: impl AsPrimitive<i64>) -> Self
pub fn index(&self, x: impl AsPrimitive<i64>, y: impl AsPrimitive<i64>) -> usize
pub fn index_checked( &self, x: impl AsPrimitive<i64>, y: impl AsPrimitive<i64>, ) -> Option<usize>
pub fn reverse(&self, index: impl AsPrimitive<i64>) -> (usize, usize)
pub fn width(&self) -> i64
pub fn height(&self) -> i64
pub fn is_valid( &self, x: impl AsPrimitive<i64>, y: impl AsPrimitive<i64>, ) -> bool
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Indexer
impl RefUnwindSafe for Indexer
impl Send for Indexer
impl Sync for Indexer
impl Unpin for Indexer
impl UnwindSafe for Indexer
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