Struct a1_notation::A1
source · pub struct A1 {
pub sheet_name: Option<String>,
pub reference: RangeOrCell,
}
Fields§
§sheet_name: Option<String>
§reference: RangeOrCell
Implementations§
source§impl A1
impl A1
sourcepub fn contains(&self, other: &Self) -> bool
pub fn contains(&self, other: &Self) -> bool
Is other
completely contained within self
? They also must be in the same sheet
(meaning self.sheet_name
== other.sheet_name
).
sourcepub fn shift_down(self, rows: usize) -> Self
pub fn shift_down(self, rows: usize) -> Self
Returns a new A1
shifted downwards by rows
rows.
sourcepub fn shift_left(self, columns: usize) -> Self
pub fn shift_left(self, columns: usize) -> Self
Returns a new A1
shifted left by columns
columns.
sourcepub fn shift_right(self, columns: usize) -> Self
pub fn shift_right(self, columns: usize) -> Self
Returns a new A1
shifted right by columns
columns.
sourcepub fn with_sheet_name(self, sheet_name: &str) -> Self
pub fn with_sheet_name(self, sheet_name: &str) -> Self
Clone into a new A1
with the given sheet_name
sourcepub fn with_x(self, x: usize) -> Self
pub fn with_x(self, x: usize) -> Self
Return a new A1
with the given X position set. If the reference
already has an x
component, it will be overwritten in the returned value.
sourcepub fn with_y(self, y: usize) -> Self
pub fn with_y(self, y: usize) -> Self
Return a new A1
with the given Y position set. If the reference
already has an y
component, it will be overwritten in the returned value.
pub fn without_sheet_name(self) -> Self
Trait Implementations§
source§impl Into<A1> for RangeOrCell
impl Into<A1> for RangeOrCell
We allow converting from a more specific type (RangeOrCell) to a more general one (A1) but
it can’t happen the other way around, so therefore we need to implement Into
rather than
From