pub enum ResealRefusal {
NotALoneCreate,
Published,
WrappedFileKey,
NoNewerEpoch {
sealed: u32,
current: u32,
},
}Expand description
Why Workspace::reseal_create refused an asset. Each is a state in which writing a new
genesis record would be wrong or impossible; none of them writes anything.
Variants§
NotALoneCreate
The asset’s provenance chain is not a lone create. A later record means the asset was
edited, and an edit is only ever authored on top of a create this device already holds as
its chain; replacing that genesis would orphan the records that follow it.
Published
The library holds a custody receipt for the asset, so the server published it. A published genesis is append-only history; it is never replaced.
WrappedFileKey
The original’s file key is wrapped (an adopted guest drop), not derived from the album key. Re-sealing it would need the key re-wrapped as well as the bytes re-encrypted, which this path does not do.
NoNewerEpoch
The album’s current epoch on this device is not newer than the one the asset is sealed under, so there is no epoch to re-seal at. This does not say why the server refused the create: the album’s epoch may not have moved at all (a revoked device, withdrawn write access), or another device rotated it and this one does not hold the new key yet.
Trait Implementations§
Source§impl Clone for ResealRefusal
impl Clone for ResealRefusal
Source§fn clone(&self) -> ResealRefusal
fn clone(&self) -> ResealRefusal
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for ResealRefusal
Source§impl Debug for ResealRefusal
impl Debug for ResealRefusal
Source§impl Display for ResealRefusal
impl Display for ResealRefusal
impl Eq for ResealRefusal
Source§impl Error for ResealRefusal
impl Error for ResealRefusal
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl PartialEq for ResealRefusal
impl PartialEq for ResealRefusal
Source§fn eq(&self, other: &ResealRefusal) -> bool
fn eq(&self, other: &ResealRefusal) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ResealRefusal
Auto Trait Implementations§
impl Freeze for ResealRefusal
impl RefUnwindSafe for ResealRefusal
impl Send for ResealRefusal
impl Sync for ResealRefusal
impl Unpin for ResealRefusal
impl UnsafeUnpin for ResealRefusal
impl UnwindSafe for ResealRefusal
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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