pub struct RangeRef {
pub start: CellRef,
pub end: CellRef,
}Expand description
A rectangular block of cells, inclusive on both ends. Always normalised (start <= end).
Fields§
§start: CellRef§end: CellRefImplementations§
Source§impl RangeRef
impl RangeRef
pub fn new(a: CellRef, b: CellRef) -> Self
pub fn cell(c: CellRef) -> Self
pub fn all() -> Self
pub fn height(&self) -> u32
pub fn width(&self) -> u32
pub fn count(&self) -> u64
pub fn is_single(&self) -> bool
pub fn is_full_rows(&self) -> bool
pub fn is_full_cols(&self) -> bool
pub fn contains(&self, c: CellRef) -> bool
pub fn contains_range(&self, o: &RangeRef) -> bool
pub fn intersects(&self, o: &RangeRef) -> bool
pub fn intersection(&self, o: &RangeRef) -> Option<RangeRef>
pub fn union(&self, o: &RangeRef) -> RangeRef
Sourcepub fn top_left(ranges: &[RangeRef]) -> Option<CellRef>
pub fn top_left(ranges: &[RangeRef]) -> Option<CellRef>
The top-left cell of a list of areas: the lowest row and the lowest column across all of
them, whatever order they are listed in. Excel writes the relative formulas of a
multi-area validation or conditional format for this cell. None for no areas.
Sourcepub fn iter(&self) -> impl Iterator<Item = CellRef> + '_
pub fn iter(&self) -> impl Iterator<Item = CellRef> + '_
Row-major iterator over the cells. Callers must bound huge ranges themselves.
Trait Implementations§
impl Copy for RangeRef
Source§impl<'de> Deserialize<'de> for RangeRef
impl<'de> Deserialize<'de> for RangeRef
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for RangeRef
impl StructuralPartialEq for RangeRef
Auto Trait Implementations§
impl Freeze for RangeRef
impl RefUnwindSafe for RangeRef
impl Send for RangeRef
impl Sync for RangeRef
impl Unpin for RangeRef
impl UnsafeUnpin for RangeRef
impl UnwindSafe for RangeRef
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
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>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.