pub enum PasteResult {
Show 16 variants
WouldChange(PasteChange),
RefusedNotASpreadsheet {
mime_type: String,
},
RefusedShortcut,
RefusedNoVisibleParents,
RefusedSheetNotFound {
title: String,
available: Vec<String>,
},
RefusedInvalidRange {
detail: String,
},
RefusedEmptyData,
RefusedInvalidDelimiter {
detail: String,
},
Blocked {
operation: DriveOperation,
decided_by: Option<DecidingRule>,
},
RefusedNoLease,
RefusedLeaseExpired,
RefusedLeaseWrongFile,
RefusedLeaseStale,
Changed(PasteChange),
AppliedReplyUnreadable {
summary: String,
change: PasteChange,
detail: String,
},
Failed {
detail: String,
},
}Expand description
What happened (or, under --dry-run, would happen).
Variants§
WouldChange(PasteChange)
--dry-run, and the gate would allow it.
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
--sheet/--source/--destination failed to compose into a
range, named a sheet no range grammar could resolve, was
open-ended where a bounded range is required, or (for cut-paste/
paste-data) named more than one cell where a single cell is
required.
RefusedEmptyData
paste-data’s --data/--data-file resolved to an empty string,
so there is nothing to paste and no extent to preview.
RefusedInvalidDelimiter
paste-data’s --delimiter was empty. The API rejects this
(Must either set html=true or a delimiter) only once the request
reaches it, so refuse locally instead, matching
text-to-columns --custom-delimiter '' (#1941).
Blocked
The folder write-permission gate refused it.
Fields
operation: DriveOperationWhich of PasteVerb::gate_operations denied first.
decided_by: Option<DecidingRule>The rule that decided the refusal, if any.
RefusedNoLease
No --lease was presented, and the deciding rule requires one.
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.
Changed(PasteChange)
The mutation succeeded.
AppliedReplyUnreadable
The API answered 2xx — the mutation was applied — but its reply
could not be read (issue #2021). Distinct from Self::Failed: the
paste happened, and a retry would paste (or, for cut-paste, move)
a second time.
Fields
summary: StringWhat was pasted where — the head of Self::Changed’s text,
without the workbook name.
change: PasteChangeSame as Self::Changed — all of it (extent, overwritten and
cleared cells, grid-edge caveat) is plan-time data, so none of it
is lost with the reply.
Failed
An API or validation error.
Trait Implementations§
Source§impl Clone for PasteResult
impl Clone for PasteResult
Source§impl Debug for PasteResult
impl Debug for PasteResult
impl Eq for PasteResult
Source§impl PartialEq for PasteResult
impl PartialEq for PasteResult
Source§impl Serialize for PasteResult
impl Serialize for PasteResult
impl StructuralPartialEq for PasteResult
Auto Trait Implementations§
impl Freeze for PasteResult
impl RefUnwindSafe for PasteResult
impl Send for PasteResult
impl Sync for PasteResult
impl Unpin for PasteResult
impl UnsafeUnpin for PasteResult
impl UnwindSafe for PasteResult
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