pub struct Coord(/* private fields */);Expand description
One 2‑D grid coordinate (row, column) plus absolute/relative flags.
Internally delegates to RelativeCoord from formualizer-common, adding the
historical API surface used throughout the evaluator.
Implementations§
Source§impl Coord
impl Coord
pub fn new(row: u32, col: u32, row_abs: bool, col_abs: bool) -> Self
pub fn from_excel(row: u32, col: u32, row_abs: bool, col_abs: bool) -> Self
pub fn row(self) -> u32
pub fn col(self) -> u32
pub fn row_abs(self) -> bool
pub fn col_abs(self) -> bool
pub fn with_row_abs(self, abs: bool) -> Self
pub fn with_col_abs(self, abs: bool) -> Self
pub fn offset(self, drow: i32, dcol: i32) -> Self
pub fn rebase(self, origin: Coord, target: Coord) -> Self
pub fn into_inner(self) -> RelativeCoord
pub fn col_to_letters(col: u32) -> String
pub fn letters_to_col(s: &str) -> Option<u32>
Trait Implementations§
Source§impl Ord for Coord
impl Ord for Coord
Source§impl PartialOrd for Coord
impl PartialOrd for Coord
impl Copy for Coord
impl Eq for Coord
impl StructuralPartialEq for Coord
Auto Trait Implementations§
impl Freeze for Coord
impl RefUnwindSafe for Coord
impl Send for Coord
impl Sync for Coord
impl Unpin for Coord
impl UnwindSafe for Coord
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more