pub struct SheetPropertiesUpdate {
pub sheet_id: i64,
pub title: Option<String>,
pub index: Option<i64>,
pub hidden: Option<bool>,
pub grid_properties: Option<GridPropertiesUpdate>,
pub tab_color_style: Option<ColorStyle>,
pub right_to_left: Option<bool>,
}Expand description
The mutable subset of a sheet’s properties this crate can set.
Deliberately not SheetProperties: reusing the response type would
serialise whatever else it happened to carry, and a field mask widened by
accident is how an unintended property gets overwritten.
Every field but sheet_id is optional. title (rename), index
(reorder) and hidden (hide/show) each have their own single-field
caller, which sets exactly that field alongside a fields mask naming
it. update-sheet-properties (issue #1835) is different: it is the
first caller that may populate several fields — grid_properties,
tab_color_style, right_to_left — in one request, each still paired
with its own mask entry. Modelling every settable property on one
struct, rather than one struct per verb, is what lets resolve_sheet/
validate_verb_args/build_request’s existing updateSheetProperties
plumbing serve all of them without triplicating it.
Fields§
§sheet_id: i64Which sheet to modify.
title: Option<String>The new title, for a rename.
index: Option<i64>The new zero-based position, for a reorder.
Whether the sheet should be hidden, for hide/show.
grid_properties: Option<GridPropertiesUpdate>Frozen rows/columns and hidden gridlines, for update-sheet-properties
(issue #1835).
tab_color_style: Option<ColorStyle>The new tab color, for update-sheet-properties (issue #1835).
Deliberately write-only: SheetProperties (the response type)
never carries this field, even though the API returns
tabColorStyle on a sheet that has one. Adding it there would strip
Eq from SheetProperties, and transitively from Sheet and
Spreadsheet, for no benefit — a dry-run preview only ever needs to
state what the color becomes, never what it was, since (unlike
frozen rows/columns) there is no meaningful “before” number to show
next to a swatch. --clear-tab-color (the CLI layer) leaves this
None while still naming tabColorStyle in the fields mask —
that is how the API is told to clear a field rather than leave it
unset.
right_to_left: Option<bool>Whether the sheet should be right-to-left, for update-sheet-properties
(issue #1835).
Trait Implementations§
Source§impl Clone for SheetPropertiesUpdate
impl Clone for SheetPropertiesUpdate
Source§impl Debug for SheetPropertiesUpdate
impl Debug for SheetPropertiesUpdate
Source§impl Default for SheetPropertiesUpdate
impl Default for SheetPropertiesUpdate
Source§impl PartialEq for SheetPropertiesUpdate
impl PartialEq for SheetPropertiesUpdate
Source§impl Serialize for SheetPropertiesUpdate
impl Serialize for SheetPropertiesUpdate
impl StructuralPartialEq for SheetPropertiesUpdate
Auto Trait Implementations§
impl Freeze for SheetPropertiesUpdate
impl RefUnwindSafe for SheetPropertiesUpdate
impl Send for SheetPropertiesUpdate
impl Sync for SheetPropertiesUpdate
impl Unpin for SheetPropertiesUpdate
impl UnsafeUnpin for SheetPropertiesUpdate
impl UnwindSafe for SheetPropertiesUpdate
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,
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