pub struct CellAddress {
pub sheet: String,
pub row: u32,
pub column: u32,
}Expand description
An owned, absolute cell address with 1-based coordinates.
Fields§
§sheet: String§row: u32§column: u32Implementations§
Source§impl CellAddress
impl CellAddress
Sourcepub fn new(
sheet: impl Into<String>,
row: u32,
column: u32,
) -> Result<Self, SheetAddressError>
pub fn new( sheet: impl Into<String>, row: u32, column: u32, ) -> Result<Self, SheetAddressError>
Construct a validated in-grid 1-based address.
Sourcepub fn to_finite(&self) -> RangeAddress
pub fn to_finite(&self) -> RangeAddress
Convert this cell to a finite one-cell range.
Sourcepub fn from_finite(range: &RangeAddress) -> Option<Self>
pub fn from_finite(range: &RangeAddress) -> Option<Self>
Convert a finite one-cell range to a cell address.
Trait Implementations§
Source§impl Clone for CellAddress
impl Clone for CellAddress
Source§fn clone(&self) -> CellAddress
fn clone(&self) -> CellAddress
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CellAddress
impl Debug for CellAddress
Source§impl Display for CellAddress
impl Display for CellAddress
Source§fn fmt(&self, f: &mut Formatter<'_>) -> Result
fn fmt(&self, f: &mut Formatter<'_>) -> Result
Render a total, sheet-qualified, relative-form A1 label.
This output omits $ markers and is not intended for reinsertion into
formula text. Zero coordinates render as Sheet!#REF!; positive columns
beyond the spreadsheet grid use unbounded bijective base-26.
impl Eq for CellAddress
Source§impl From<CellAddress> for RangeAddress
impl From<CellAddress> for RangeAddress
Source§fn from(value: CellAddress) -> Self
fn from(value: CellAddress) -> Self
Converts to this type from the input type.
Source§impl Hash for CellAddress
impl Hash for CellAddress
Source§impl PartialEq for CellAddress
impl PartialEq for CellAddress
impl StructuralPartialEq for CellAddress
Source§impl TryFrom<RangeAddress> for CellAddress
impl TryFrom<RangeAddress> for CellAddress
Source§type Error = SheetAddressError
type Error = SheetAddressError
The type returned in the event of a conversion error.
Auto Trait Implementations§
impl Freeze for CellAddress
impl RefUnwindSafe for CellAddress
impl Send for CellAddress
impl Sync for CellAddress
impl Unpin for CellAddress
impl UnsafeUnpin for CellAddress
impl UnwindSafe for CellAddress
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