pub struct GridRange {
pub sheet_id: i64,
pub start_row_index: Option<i64>,
pub end_row_index: Option<i64>,
pub start_column_index: Option<i64>,
pub end_column_index: Option<i64>,
}Expand description
A rectangular cell range, addressed numerically.
The shape every batchUpdate request that targets a range (as
opposed to a whole dimension span like DimensionRange) uses:
repeatCell, updateBorders, mergeCells, unmergeCells,
setDataValidation, addProtectedRange, deleteRange.
structure.rs::grid_range is deleteRange’s one caller, and always
sends a fully-bounded value (every field Some) — an open-ended delete
on one axis degenerates into deleteDimension semantics and is out of
scope for it, exactly as DeleteDimensionRequest already covers.
Zero-based and half-open on both axes, matching the API. Each bound is
independently optional: None on both row bounds means “every row” (a
whole-column reference, A:A); None on both column bounds means “every
column” (5:5); None on all four means the entire sheet. The single
A1-to-GridRange conversion lives in grid_range::parse_grid_range,
never at a call site — see its module docs for why this is new work
a1.rs deliberately doesn’t do.
Also Deserialize, unlike most other outbound-only request pieces in
this file: ProtectedRange (a response shape) embeds one, since a
protected range is itself addressed by the GridRange it covers.
Fields§
§sheet_id: i64The sheet this range belongs to.
start_row_index: Option<i64>First row, inclusive, zero-based. None means “from the first row”.
end_row_index: Option<i64>Last row, exclusive, zero-based. None means “to the last row”.
start_column_index: Option<i64>First column, inclusive, zero-based. None means “from the first
column”.
end_column_index: Option<i64>Last column, exclusive, zero-based. None means “to the last
column”.
Trait Implementations§
impl Copy for GridRange
Source§impl<'de> Deserialize<'de> for GridRange
impl<'de> Deserialize<'de> for GridRange
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>,
impl Eq for GridRange
impl StructuralPartialEq for GridRange
Auto Trait Implementations§
impl Freeze for GridRange
impl RefUnwindSafe for GridRange
impl Send for GridRange
impl Sync for GridRange
impl Unpin for GridRange
impl UnsafeUnpin for GridRange
impl UnwindSafe for GridRange
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
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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> ⓘ
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> ⓘ
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