pub struct DriveMutationOutcome {Show 40 fields
pub operation: &'static str,
pub file_id: String,
pub file_name: String,
pub status: String,
pub added_principals: Vec<String>,
pub removed_principals: Vec<String>,
pub crosses_drive_boundary: bool,
pub resolved_folder_id: Option<String>,
pub decided_by_folder_id: Option<String>,
pub decided_by_depth: Option<usize>,
pub decided_by_file_id: Option<String>,
pub range: Option<String>,
pub updated_range: Option<String>,
pub updated_rows: Option<i64>,
pub updated_columns: Option<i64>,
pub updated_cells: Option<i64>,
pub sheet_id: Option<i64>,
pub sheet_title: Option<String>,
pub sheet_new_title: Option<String>,
pub dimension_range: Option<String>,
pub move_to: Option<i64>,
pub grid_range: Option<String>,
pub occurrences_changed: Option<i64>,
pub inserted_chars: Option<i64>,
pub required_revision_id: Option<String>,
pub fields_changed: Option<String>,
pub discarded_cells: Vec<String>,
pub overwritten_cells: Vec<String>,
pub overwritten_cells_upper_bound: bool,
pub validation_type: Option<String>,
pub protected_range_id: Option<i64>,
pub protection_editors_added: Vec<String>,
pub protection_editors_removed: Vec<String>,
pub filter_view_id: Option<i64>,
pub named_range_id: Option<String>,
pub referencing_formula_locations: Vec<String>,
pub embedded_object_id: Option<i64>,
pub banded_range_id: Option<i64>,
pub error: Option<String>,
pub duration: Duration,
}Expand description
The outcome of one Drive mutation attempt.
Default so a caller names only the fields its verb actually has: this
struct is shared by every mutating verb and most leave most of it empty.
Note duration defaults to zero, which is never the right value — every
construction site sets it explicitly.
Fields§
§operation: &'static strThe verb — "rename", "move", "sheets-write", … ; becomes the
record’s command as ["drive", <operation>].
file_id: StringThe Drive file id acted on.
file_name: StringThe file’s name at the time of the attempt.
status: StringThe domain outcome (e.g. "moved", "blocked", "already-in-folder",
"failed" — kebab-case, matching MoveResult’s
#[serde(tag = "status", rename_all = "kebab-case")]).
added_principals: Vec<String>Principals gaining access, when the visibility diff detected an
increase. Empty for rename (which never changes visibility) and
for a move with no visibility change.
removed_principals: Vec<String>Principals losing access — the decrease-side counterpart of
added_principals.
crosses_drive_boundary: boolWhether the file moved across a My Drive / Shared Drive boundary.
resolved_folder_id: Option<String>The folder the write-permission gate evaluated against (issue
#1574) — the --parent for create/upload, the target’s current
parent for edit. None for rename/move (never gated), for a
content_edit outcome that short-circuited before the gate (a
Google-native-document refusal), and for any verdict a file_id
rule decided (issue #1612), which is settled at depth −1 without
evaluating a folder at all. In that last case decided_by_file_id
carries the id instead.
decided_by_folder_id: Option<String>The folder id of the configured rule that decided the write-gate
verdict, when one did (as opposed to the bare default policy).
Paired with decided_by_depth.
decided_by_depth: Option<usize>How many levels above resolved_folder_id that rule’s folder sits.
decided_by_file_id: Option<String>The file id of the configured rule that decided the write-gate verdict, when a file rule did (issue #1612).
Mutually exclusive with decided_by_folder_id, deliberately: a file
id must never appear in the folder field, or an existing
omni-dev log --query decided_by_folder_id:X would silently start
matching a different kind of id. A file rule matches the target
itself, so it has no depth and walks no chain — decided_by_depth
and resolved_folder_id are both None alongside it.
range: Option<String>The A1 range a Sheets write targeted (issue #1589). None for every
non-Sheets verb.
updated_range: Option<String>The server-normalised range the Sheets API reported writing or
clearing. Can differ from Self::range: the server resolves an
open-ended range against the sheet’s actual extent.
updated_rows: Option<i64>Rows the Sheets API reported writing.
updated_columns: Option<i64>Columns the Sheets API reported writing.
updated_cells: Option<i64>Cells the Sheets API reported writing — the number that answers “how much did that write actually touch”.
sheet_id: Option<i64>The stable numeric id of the sheet a structural verb acted on
(issue #1613). Unlike a title it survives a later rename, so it is
the only durable answer to “which tab was this”. None for every
non-structural verb.
sheet_title: Option<String>The sheet’s title at the time of the attempt — for add-sheet, the
title being created.
sheet_new_title: Option<String>The title a rename-sheet moved the sheet to. Set by that verb
alone: it is the only structural verb whose effect a record could not
otherwise reconstruct, since Self::sheet_title necessarily holds
the title the sheet had before. None everywhere else.
dimension_range: Option<String>The rows or columns a structural verb spanned, e.g. "ROWS 5:7",
1-based and inclusive like the CLI’s --at. The structural analogue
of Self::range, for effects A1 notation cannot express; absent
for verbs that span no dimension.
move_to: Option<i64>The 1-based --before value of a move-rows/move-columns verb
(issue #1834), numbered as the sheet stood before the move —
matching the CLI flag and Self::dimension_range’s own numbering.
None for every other verb.
grid_range: Option<String>The rectangular cell range a delete-range verb spanned (issue
#1623), e.g. "rows 2-10, columns 2-4", 1-based inclusive like the
CLI’s --start-row/--end-row/--start-column/--end-column. The
deleteRange analogue of Self::dimension_range, which only ever
spans one axis. None for every other verb.
occurrences_changed: Option<i64>Occurrences the Docs API reported changing (issue #1615). None for
every verb but docs replace.
The server’s count, not the client-side estimate --dry-run
previews — the two can differ, and only this one says what actually
happened.
inserted_chars: Option<i64>Characters inserted by a docs append or a docs create --text.
required_revision_id: Option<String>The revision lease presented on a documents.batchUpdate (issue
#1615).
Recorded so a stale-revision refusal is as auditable as a success.
An opaque, per-user, short-lived id — not a secret, and not user
content. The searched, replacement and inserted text are
deliberately never recorded; docs/log.md documents what is.
fields_changed: Option<String>A human-readable summary of what a formatting/dimension-property
verb changed (issue #1643) — format-cells’ populated CellFormat
fields, update-borders’ sides and style, merge-cells‘/
unmerge-cells’ effect, or the dimension property set. The
formatting analogue of Self::dimension_range: these verbs can
send more than one field in a single request, so a single range-
or dimension_range-shaped key can’t name the effect on its own.
discarded_cells: Vec<String>merge-cells only (issue #1643): the non-top-left, non-blank cells
a merge discarded, as "A1: value" strings — the one formatting
request that destroys data, so its record says exactly what was
lost rather than only that a merge happened.
overwritten_cells: Vec<String>auto-fill only (issue #1840, ADR-0083
§6): the non-blank cells in the destination range that were (or,
under --dry-run, would be) overwritten, as bare A1 addresses
— deliberately not "A1: value" like Self::discarded_cells,
since a fill’s values are Sheets’ own series detection and this
crate never sees them, before or after the request. Empty when the
destination has no non-blank cells, and for every other verb.
overwritten_cells_upper_bound: boolauto-fill --range and every text-to-columns run:
Self::overwritten_cells is an upper bound, not a list of
cells that were certainly overwritten. auto-fill --range lets
Sheets decide for itself which cells in the named range are the
source and which are filled, so some of the listed cells are the
source and were never touched; text-to-columns reports the span a
locally computed, non-quote-aware split might need, which the API
decides for itself and may need fewer columns of — and under
--delimiter auto, where Sheets picks the separator as well, it
is an estimate rather than a bound in either direction (this key
has no third state; that caveat is carried in the rendered
output). false for auto-fill --source, where the destination
is computed client-side and the list is exact, and for every
other verb.
validation_type: Option<String>The data validation condition type a set-data-validation applied
(issue #1643) — "ONE_OF_LIST", "NUMBER_BETWEEN", "BOOLEAN",
"CUSTOM_FORMULA" — or "cleared" for clear-data-validation.
None for every non-validation verb.
protected_range_id: Option<i64>The stable numeric id of a protected range a protection verb acted
on (issue #1643, ADR-0077). Set by
protect-range from the addProtectedRange reply (the id is
server-assigned, like Self::sheet_id for add-sheet) and by
update-protection/unprotect-range from the range they resolved
against.
protection_editors_added: Vec<String>Editors a protect-range/update-protection granted an exemption
from the protection. Empty unless the verb actually changed the
editor list.
protection_editors_removed: Vec<String>Editors an update-protection removed the exemption from — the
decrease-side counterpart of Self::protection_editors_added.
filter_view_id: Option<i64>The stable numeric id of a filter view an add-filter-view/
update-filter-view/delete-filter-view acted on (issue #1794).
Set from the addFilterView reply for add-filter-view (the id is
server-assigned, like Self::protected_range_id for
protect-range) and from the id resolved against for
update-filter-view/delete-filter-view. None for
set-basic-filter/clear-basic-filter, which are scoped to a sheet
rather than a filter view — see Self::sheet_id.
named_range_id: Option<String>The stable id of a named range a named-range verb acted on (issue
#1796, ADR-0081 §2). Set by
add-named-range from the addNamedRange reply (server-assigned,
like Self::protected_range_id) and by update-named-range/
delete-named-range from the named range they resolved against.
referencing_formula_locations: Vec<String>delete-named-range only (ADR-0081 §2): the A1 locations of every
formula referencing the name being removed, as "Sheet!A1" strings —
never the formula text or a cell’s value, matching
Self::discarded_cells’s no-content-exposure line. Empty when
nothing references the name, and for every other named-range verb.
embedded_object_id: Option<i64>The stable numeric id of a chart or slicer an add-chart/
update-chart/delete-chart/add-slicer/update-slicer/
delete-slicer acted on (issue #1797). Set from the addChart/
addSlicer reply for the two adds (the id is server-assigned, like
Self::filter_view_id for add-filter-view) and from the id
resolved against otherwise. One key for both kinds — Sheets’
deleteEmbeddedObject itself addresses a chart or a slicer by the
same objectId with no discriminator naming which.
banded_range_id: Option<i64>The stable numeric id of a banded range an add-banding/
update-banding/delete-banding acted on (issue #1832). Set from
the addBanding reply for add-banding (server-assigned, like
Self::filter_view_id for add-filter-view) and from the id
resolved against for update-banding/delete-banding.
error: Option<String>The API/validation error, when the attempt failed.
duration: DurationWall time of the attempt.
Trait Implementations§
Source§impl Clone for DriveMutationOutcome
impl Clone for DriveMutationOutcome
Source§impl Debug for DriveMutationOutcome
impl Debug for DriveMutationOutcome
Auto Trait Implementations§
impl Freeze for DriveMutationOutcome
impl RefUnwindSafe for DriveMutationOutcome
impl Send for DriveMutationOutcome
impl Sync for DriveMutationOutcome
impl Unpin for DriveMutationOutcome
impl UnsafeUnpin for DriveMutationOutcome
impl UnwindSafe for DriveMutationOutcome
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