pub enum EditResult {
WouldEdit,
RefusedNativeDocument,
RefusedNoVisibleParents,
Blocked {
decided_by: Option<DecidingRule>,
},
RefusedNoLease,
RefusedLeaseExpired,
RefusedLeaseWrongFile,
RefusedLeaseStale,
Edited,
Failed {
detail: String,
},
}Expand description
What happened (or, under --dry-run, would happen).
Variants§
WouldEdit
--dry-run, and the gate would allow it.
RefusedNativeDocument
The target is a Google-native document (Docs/Sheets/Slides/…) with no fixed byte content a raw media PATCH can replace. Checked client-side, before the gate — this isn’t a policy decision, the operation is simply nonsensical for this target.
RefusedNoVisibleParents
The target has no parents this account can see and no file_id
rule named it, so nothing could grant it (issue #1612).
Mirrors crate::drive::sheets::write::WriteResult’s variant of the
same name. Before #1612 this case fell into Blocked { decided_by: None }, which reads as “no rule matched, fix your rules” when no
folder rule the operator could write would have helped — the
latent gap ADR-0073 §4 flagged for
drive edit.
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).
Edited
files.update (media) succeeded.
Failed
An API/validation error.
Trait Implementations§
Source§impl Clone for EditResult
impl Clone for EditResult
Source§impl Debug for EditResult
impl Debug for EditResult
Auto Trait Implementations§
impl Freeze for EditResult
impl RefUnwindSafe for EditResult
impl Send for EditResult
impl Sync for EditResult
impl Unpin for EditResult
impl UnsafeUnpin for EditResult
impl UnwindSafe for EditResult
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