pub enum StructureVerb {
Show 16 variants
AddSheet {
title: String,
index: Option<i64>,
rows: Option<i64>,
columns: Option<i64>,
},
RenameSheet {
sheet: String,
new_title: String,
},
InsertRows {
sheet: String,
at: i64,
count: i64,
},
InsertColumns {
sheet: String,
at: i64,
count: i64,
},
InsertRange {
sheet: String,
start_row: i64,
end_row: i64,
start_column: i64,
end_column: i64,
shift: ShiftDimension,
},
MoveRows {
sheet: String,
at: i64,
count: i64,
before: i64,
},
MoveColumns {
sheet: String,
at: i64,
count: i64,
before: i64,
},
DeleteSheet {
sheet: String,
},
DeleteRows {
sheet: String,
at: i64,
count: i64,
},
DeleteColumns {
sheet: String,
at: i64,
count: i64,
},
DeleteRange {
sheet: String,
start_row: i64,
end_row: i64,
start_column: i64,
end_column: i64,
shift: ShiftDimension,
},
DuplicateSheet {
sheet: String,
title: Option<String>,
index: Option<i64>,
},
ReorderSheet {
sheet: String,
index: i64,
},
SetSheetVisibility {
sheet: String,
hidden: bool,
},
UpdateSheetProperties {
sheet: String,
freeze_rows: Option<i64>,
freeze_columns: Option<i64>,
tab_color: Option<String>,
clear_tab_color: bool,
right_to_left: Option<bool>,
hide_gridlines: Option<bool>,
},
UpdateWorkbookProperties {
locale: Option<String>,
time_zone: Option<String>,
auto_recalc: Option<RecalculationInterval>,
iterative_calculation: Option<IterativeCalculationToggle>,
iterative_calculation_max_iterations: Option<i64>,
iterative_calculation_convergence_threshold: Option<f64>,
},
}Expand description
Which structural mutation to perform.
Unlike write.rs’s WriteVerb,
which is fieldless with its arguments in the options struct, these verbs
take disjoint arguments, so the enum carries them. That also means an
impossible combination — a --title on an insert, say — is not
representable.
Variants§
AddSheet
Add a new sheet to the workbook.
Fields
RenameSheet
Rename an existing sheet.
InsertRows
Insert empty rows, shifting existing ones down.
Fields
InsertColumns
Insert empty columns, shifting existing ones right.
Fields
InsertRange
Insert empty cells into a rectangular range, shifting existing cells down or right within the same grid (issue #1838).
All four bounds are required together: this crate only ever sends a
fully-bounded GridRange. Whole rows and columns belong to
Self::InsertRows and Self::InsertColumns.
Fields
shift: ShiftDimensionWhich way existing cells shift to make room.
MoveRows
Move a contiguous block of rows to a new position within the same sheet, shifting the rows in between to close the gap (issue #1834).
Fields
MoveColumns
Move a contiguous block of columns to a new position within the same sheet, shifting the columns in between to close the gap (issue #1834).
Fields
DeleteSheet
Delete an entire sheet from the workbook.
DeleteRows
Delete whole rows, shifting the remainder up to close the gap.
Fields
DeleteColumns
Delete whole columns, shifting the remainder left to close the gap.
Fields
DeleteRange
Delete a rectangular cell range, shifting the remainder along one axis to close the gap.
All four bounds are required together: this crate only ever sends a
fully-bounded GridRange. An open-ended range on one axis would
degenerate into Self::DeleteRows/Self::DeleteColumns
semantics and is out of scope here.
Fields
shift: ShiftDimensionWhich way to shift the remaining cells afterward.
DuplicateSheet
Copy an existing sheet within the same workbook.
Fields
ReorderSheet
Move an existing sheet to a new position among its siblings.
SetSheetVisibility
Hide or show an existing sheet.
UpdateSheetProperties
Change a sheet’s view properties — frozen rows/columns, tab color,
right-to-left layout, and whether gridlines are hidden (issue #1835).
Every field is independently optional; the caller sets whichever it
passed, and build_request’s fields mask names exactly those.
Fields
UpdateWorkbookProperties
Change workbook-level properties: locale, time zone, auto-recalc and/or iterative calculation (issue #1836). The one verb in this enum with no sheet target — see the module doc comment.
Fields
time_zone: Option<String>The new IANA time zone, e.g. "America/New_York". None leaves
it unchanged.
auto_recalc: Option<RecalculationInterval>The new auto-recalculation interval. None leaves it unchanged.
iterative_calculation: Option<IterativeCalculationToggle>Turns iterative calculation on or off. None leaves it
unchanged; the two sub-fields below are only meaningful
alongside Some(IterativeCalculationToggle::On) —
validate_verb_args refuses every other combination.
Trait Implementations§
Source§impl Clone for StructureVerb
impl Clone for StructureVerb
Source§impl Debug for StructureVerb
impl Debug for StructureVerb
Source§impl PartialEq for StructureVerb
impl PartialEq for StructureVerb
impl StructuralPartialEq for StructureVerb
Auto Trait Implementations§
impl Freeze for StructureVerb
impl RefUnwindSafe for StructureVerb
impl Send for StructureVerb
impl Sync for StructureVerb
impl Unpin for StructureVerb
impl UnsafeUnpin for StructureVerb
impl UnwindSafe for StructureVerb
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