Skip to main content

StructureVerb

Enum StructureVerb 

Source
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

§title: String

Title for the new sheet.

§index: Option<i64>

Zero-based position; None appends.

§rows: Option<i64>

Initial row count; None takes Sheets’ default.

§columns: Option<i64>

Initial column count; None takes Sheets’ default.

§

RenameSheet

Rename an existing sheet.

Fields

§sheet: String

Current title of the sheet to rename.

§new_title: String

The new title.

§

InsertRows

Insert empty rows, shifting existing ones down.

Fields

§sheet: String

Title of the sheet to modify.

§at: i64

1-based row to insert before.

§count: i64

How many rows to insert.

§

InsertColumns

Insert empty columns, shifting existing ones right.

Fields

§sheet: String

Title of the sheet to modify.

§at: i64

1-based column to insert before.

§count: i64

How many columns to insert.

§

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

§sheet: String

Title of the sheet to modify.

§start_row: i64

1-based first row, inclusive.

§end_row: i64

1-based last row, inclusive.

§start_column: i64

1-based first column, inclusive.

§end_column: i64

1-based last column, inclusive.

§shift: ShiftDimension

Which 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

§sheet: String

Title of the sheet to modify.

§at: i64

1-based first row of the block to move, inclusive.

§count: i64

How many rows the block spans.

§before: i64

1-based row the block moves in front of, numbered as the sheet stands before the move (the API’s own destinationIndex convention, translated by move_destination_index).

§

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

§sheet: String

Title of the sheet to modify.

§at: i64

1-based first column of the block to move, inclusive.

§count: i64

How many columns the block spans.

§before: i64

1-based column the block moves in front of, numbered as the sheet stands before the move.

§

DeleteSheet

Delete an entire sheet from the workbook.

Fields

§sheet: String

Title of the sheet to delete.

§

DeleteRows

Delete whole rows, shifting the remainder up to close the gap.

Fields

§sheet: String

Title of the sheet to modify.

§at: i64

1-based first row to delete, inclusive.

§count: i64

How many rows to delete.

§

DeleteColumns

Delete whole columns, shifting the remainder left to close the gap.

Fields

§sheet: String

Title of the sheet to modify.

§at: i64

1-based first column to delete, inclusive.

§count: i64

How many columns to delete.

§

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

§sheet: String

Title of the sheet to modify.

§start_row: i64

1-based first row, inclusive.

§end_row: i64

1-based last row, inclusive.

§start_column: i64

1-based first column, inclusive.

§end_column: i64

1-based last column, inclusive.

§shift: ShiftDimension

Which way to shift the remaining cells afterward.

§

DuplicateSheet

Copy an existing sheet within the same workbook.

Fields

§sheet: String

Title of the sheet to copy.

§title: Option<String>

Title for the copy; None takes Sheets’ own “Copy of X” default.

§index: Option<i64>

Zero-based position for the copy; None appends.

§

ReorderSheet

Move an existing sheet to a new position among its siblings.

Fields

§sheet: String

Title of the sheet to move.

§index: i64

The new zero-based position.

§

SetSheetVisibility

Hide or show an existing sheet.

Fields

§sheet: String

Title of the sheet to modify.

§hidden: bool

true hides it, false shows it.

§

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

§sheet: String

Title of the sheet to modify.

§freeze_rows: Option<i64>

Rows to freeze at the top, when changing it.

§freeze_columns: Option<i64>

Columns to freeze at the left, when changing it.

§tab_color: Option<String>

The new tab color, #RRGGBB, when setting it.

§clear_tab_color: bool

Clear the tab color back to none. Mutually exclusive with tab_color (the CLI’s clap::ArgGroup conflict enforces this; validate_verb_args refuses the combination defensively too).

§right_to_left: Option<bool>

The new right-to-left flag, when changing it.

§hide_gridlines: Option<bool>

The new hide-gridlines flag, when changing it.

§

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

§locale: Option<String>

The new locale, e.g. "en_US". None leaves it unchanged.

§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.

§iterative_calculation_max_iterations: Option<i64>

Maximum calculation rounds, for iterative_calculation == Some(On). None takes Sheets’ own default.

§iterative_calculation_convergence_threshold: Option<f64>

Convergence threshold, for iterative_calculation == Some(On). None takes Sheets’ own default.

Trait Implementations§

Source§

impl Clone for StructureVerb

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for StructureVerb

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for StructureVerb

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for StructureVerb

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FromRef<T> for T
where T: Clone,

Source§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more