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<CellAddress, SheetAddressError>
pub fn new( sheet: impl Into<String>, row: u32, column: u32, ) -> Result<CellAddress, 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<CellAddress>
pub fn from_finite(range: &RangeAddress) -> Option<CellAddress>
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<'de> Deserialize<'de> for CellAddress
impl<'de> Deserialize<'de> for CellAddress
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<CellAddress, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<CellAddress, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for CellAddress
impl Display for CellAddress
Source§fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>
fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>
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) -> RangeAddress
fn from(value: CellAddress) -> RangeAddress
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
Source§impl Serialize for CellAddress
impl Serialize for CellAddress
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
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.
Source§fn try_from(
value: RangeAddress,
) -> Result<CellAddress, <CellAddress as TryFrom<RangeAddress>>::Error>
fn try_from( value: RangeAddress, ) -> Result<CellAddress, <CellAddress as TryFrom<RangeAddress>>::Error>
Performs the conversion.
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§
impl<T> Allocation for T
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<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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