pub struct CellRef {
pub row: u32,
pub col: u32,
}Expand description
A cell position (0-based).
Fields§
§row: u32§col: u32Implementations§
Source§impl CellRef
impl CellRef
pub const fn new(row: u32, col: u32) -> Self
pub fn is_valid(&self) -> bool
Sourcepub fn offset(&self, dr: i64, dc: i64) -> Option<CellRef>
pub fn offset(&self, dr: i64, dc: i64) -> Option<CellRef>
Moved by (dr, dc), None when the result leaves the sheet.
Sourcepub fn offset_clamped(&self, dr: i64, dc: i64) -> CellRef
pub fn offset_clamped(&self, dr: i64, dc: i64) -> CellRef
Moved by (dr, dc) and clamped to the sheet.
Trait Implementations§
impl Copy for CellRef
Source§impl<'de> Deserialize<'de> for CellRef
impl<'de> Deserialize<'de> for CellRef
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 Eq for CellRef
Source§impl Ord for CellRef
impl Ord for CellRef
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for CellRef
impl PartialOrd for CellRef
impl StructuralPartialEq for CellRef
Auto Trait Implementations§
impl Freeze for CellRef
impl RefUnwindSafe for CellRef
impl Send for CellRef
impl Sync for CellRef
impl Unpin for CellRef
impl UnsafeUnpin for CellRef
impl UnwindSafe for CellRef
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.