pub struct RangeArea {
pub sheet: String,
pub start_row: Option<u32>,
pub start_column: Option<u32>,
pub end_row: Option<u32>,
pub end_column: Option<u32>,
}Expand description
An owned, absolute range area with optional, inclusive 1-based bounds.
None represents an open side on that axis.
Fields§
§sheet: String§start_row: Option<u32>§start_column: Option<u32>§end_row: Option<u32>§end_column: Option<u32>Implementations§
Source§impl RangeArea
impl RangeArea
Sourcepub fn new(
sheet: impl Into<String>,
start_row: Option<u32>,
start_column: Option<u32>,
end_row: Option<u32>,
end_column: Option<u32>,
) -> Result<Self, SheetAddressError>
pub fn new( sheet: impl Into<String>, start_row: Option<u32>, start_column: Option<u32>, end_row: Option<u32>, end_column: Option<u32>, ) -> Result<Self, SheetAddressError>
Construct an area, rejecting out-of-grid coordinates and inverted finite axes.
Sourcepub fn from_finite(range: &RangeAddress) -> Self
pub fn from_finite(range: &RangeAddress) -> Self
Copy a finite range into the open-area representation.
Sourcepub fn to_finite(&self) -> Option<RangeAddress>
pub fn to_finite(&self) -> Option<RangeAddress>
Convert to a finite range when all four bounds are present.
Trait Implementations§
impl Eq for RangeArea
impl StructuralPartialEq for RangeArea
Auto Trait Implementations§
impl Freeze for RangeArea
impl RefUnwindSafe for RangeArea
impl Send for RangeArea
impl Sync for RangeArea
impl Unpin for RangeArea
impl UnsafeUnpin for RangeArea
impl UnwindSafe for RangeArea
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