pub enum AutoFillResult {
Show 14 variants
WouldChange {
summary: String,
destination: String,
requested_destination: Option<String>,
overwritten_cells: Vec<String>,
destination_is_upper_bound: bool,
},
RefusedNotASpreadsheet {
mime_type: String,
},
RefusedShortcut,
RefusedNoVisibleParents,
RefusedSheetNotFound {
title: String,
available: Vec<String>,
},
RefusedInvalidRange {
detail: String,
},
RefusedDestinationPastGrid {
requested_destination: String,
row_count: Option<i64>,
column_count: Option<i64>,
},
Blocked {
decided_by: Option<DecidingRule>,
},
RefusedNoLease,
RefusedLeaseExpired,
RefusedLeaseWrongFile,
RefusedLeaseStale,
Changed {
summary: String,
destination: String,
requested_destination: Option<String>,
overwritten_cells: Vec<String>,
destination_is_upper_bound: bool,
},
Failed {
detail: String,
},
}Expand description
What happened (or, under --dry-run, would happen).
Variants§
WouldChange
--dry-run, and the gate would allow it.
Fields
summary: StringA human-readable, tense-neutral summary of the effect —
also the request log’s fields_changed. Names the destination,
the source it extends (form B), the direction, and the
alternate-series flag; the overwrite count and the two caveats
are separate, tense-varying lines built by describe_lines,
so this same string reads correctly under both Would … and
Applied: ….
destination: StringThe destination range’s A1 address, as autoFill will
actually fill it — clamped to the sheet’s current extent
when the computed/named destination runs past it (verified
live, #1937: autoFill clips rather than growing the sheet).
This is what the request log’s range records.
requested_destination: Option<String>The unclamped destination, when it differs from destination
— i.e. when clipping happened. None in the common case
(destination inside the grid, or the sheet’s extent is
unknown), so the JSON output carries no new key then.
overwritten_cells: Vec<String>The non-blank cells within the destination that would be
overwritten, as bare A1 addresses — never their values,
unlike merge-cells’ own discarded_cells (ADR-0083 §6).
destination_is_upper_bound: booltrue for form A (--range): Sheets decides the source/
destination split itself, so overwritten_cells names every
non-blank cell in the named range, an upper bound on what the
fill will actually touch. false for form B, where the
destination — and so this list — is exact.
RefusedNotASpreadsheet
The target is not a Google Sheet.
RefusedShortcut
The target is a shortcut, which we do not follow.
RefusedNoVisibleParents
The target has no parents this account can see.
RefusedSheetNotFound
The named sheet does not exist in this workbook.
RefusedInvalidRange
The --sheet/range-or-source pair, --fill-length, or the
resulting destination was invalid.
RefusedDestinationPastGrid
The destination lies wholly past the sheet’s current extent on some
axis — clipping (see the module docs’ “The grid edge” section)
would leave nothing to fill, and reporting Changed/WouldChange
for a no-op would misstate what happened. Checked, and refused,
before any lease is checked or batchUpdate is called — identically
for --dry-run and a real run.
Fields
Blocked
The folder write-permission gate refused it.
Fields
decided_by: Option<DecidingRule>The rule that decided the refusal, if any.
RefusedNoLease
No --lease was presented, and the deciding rule requires one
(ADR-0080 §9).
RefusedLeaseExpired
The presented lease has expired, or was never a token this ledger knows about.
RefusedLeaseWrongFile
The presented lease is bound to a different file id.
RefusedLeaseStale
The file has moved since the lease’s recorded version — the
staleness check (ADR-0080 §6).
Changed
The mutation succeeded.
Fields
summary: StringThe same tense-neutral summary Self::WouldChange carries,
built by the same call — which is why it reads correctly after
the fact as well as before it.
destination: StringSame as Self::WouldChange.
requested_destination: Option<String>Same as Self::WouldChange.
overwritten_cells: Vec<String>Same as Self::WouldChange — read before the mutating call
(the same read serves both paths), so this names what was
overwritten, not a post-hoc guess.
destination_is_upper_bound: boolSame as Self::WouldChange.
Failed
An API or validation error.
Trait Implementations§
Source§impl Clone for AutoFillResult
impl Clone for AutoFillResult
Source§impl Debug for AutoFillResult
impl Debug for AutoFillResult
impl Eq for AutoFillResult
Source§impl PartialEq for AutoFillResult
impl PartialEq for AutoFillResult
Source§impl Serialize for AutoFillResult
impl Serialize for AutoFillResult
impl StructuralPartialEq for AutoFillResult
Auto Trait Implementations§
impl Freeze for AutoFillResult
impl RefUnwindSafe for AutoFillResult
impl Send for AutoFillResult
impl Sync for AutoFillResult
impl Unpin for AutoFillResult
impl UnsafeUnpin for AutoFillResult
impl UnwindSafe for AutoFillResult
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<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