pub enum ProtectionResult {
Show 16 variants
WouldChange {
summary: String,
},
RefusedNotASpreadsheet {
mime_type: String,
},
RefusedShortcut,
RefusedNoVisibleParents,
RefusedSheetNotFound {
title: String,
available: Vec<String>,
},
RefusedInvalidRange {
detail: String,
},
RefusedProtectionNotFound {
detail: String,
},
RefusedAmbiguousProtection {
candidates: Vec<i64>,
},
Blocked {
decided_by: Option<DecidingRule>,
},
RefusedNoLease,
RefusedLeaseExpired,
RefusedLeaseWrongFile,
RefusedLeaseStale,
Changed {
summary: String,
protected_range_id: Option<i64>,
},
AppliedReplyUnreadable {
summary: String,
protected_range_id: Option<i64>,
detail: String,
},
Failed {
detail: String,
},
}Expand description
What happened (or, under --dry-run, would happen).
Variants§
WouldChange
--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
The --sheet/--range pair was invalid.
RefusedProtectionNotFound
update-protection/unprotect-range found no protected range
covering exactly the given target.
RefusedAmbiguousProtection
update-protection/unprotect-range’s target matched more than one
protected range — refused rather than guessing which was meant.
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: StringSame summary as Self::WouldChange.
AppliedReplyUnreadable
The API answered 2xx — the mutation was applied — but its reply
could not be read (issue #2021). Distinct from Self::Failed: a
retry here would stack a second protection over the same range. The
server-assigned id of a new protected range was in that reply, so it
is unknown.
Fields
summary: StringSame summary as Self::WouldChange.
Failed
An API or validation error.
Trait Implementations§
Source§impl Clone for ProtectionResult
impl Clone for ProtectionResult
Source§impl Debug for ProtectionResult
impl Debug for ProtectionResult
impl Eq for ProtectionResult
Source§impl PartialEq for ProtectionResult
impl PartialEq for ProtectionResult
Source§impl Serialize for ProtectionResult
impl Serialize for ProtectionResult
impl StructuralPartialEq for ProtectionResult
Auto Trait Implementations§
impl Freeze for ProtectionResult
impl RefUnwindSafe for ProtectionResult
impl Send for ProtectionResult
impl Sync for ProtectionResult
impl Unpin for ProtectionResult
impl UnsafeUnpin for ProtectionResult
impl UnwindSafe for ProtectionResult
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