pub struct ReleaseGate<'a, V: StorageVerifier + ?Sized> { /* private fields */ }Expand description
The verify-before-destroy gate over a StorageVerifier. It never destroys anything itself:
may_release is the pure decision the three destructive paths
(device-owned-original release, Move-import source deletion, streaming-mode release) consult
before any local cleanup, and streaming import drives its per-asset release window
through the same call.
Implementations§
Source§impl<'a, V: StorageVerifier + ?Sized> ReleaseGate<'a, V>
impl<'a, V: StorageVerifier + ?Sized> ReleaseGate<'a, V>
Sourcepub fn may_release(
&self,
asset_id: Uuid,
blob_hashes: &[Hash32],
verify_asset_accepted: bool,
) -> ReleaseDecision
pub fn may_release( &self, asset_id: Uuid, blob_hashes: &[Hash32], verify_asset_accepted: bool, ) -> ReleaseDecision
Decide whether the write’s local bytes may be released. Both halves of the gate are
required: the server’s verdict must be durable (with every declared blob individually
re-checking as safely stored and verify_asset having accepted the asset — the
release_is_safe conjunction), and a verified custody receipt must be held. A
transport failure on either fetch yields a Retain, never a destroy.
Auto Trait Implementations§
impl<'a, V> Freeze for ReleaseGate<'a, V>where
V: ?Sized,
impl<'a, V> RefUnwindSafe for ReleaseGate<'a, V>where
V: RefUnwindSafe + ?Sized,
impl<'a, V> Send for ReleaseGate<'a, V>
impl<'a, V> Sync for ReleaseGate<'a, V>
impl<'a, V> Unpin for ReleaseGate<'a, V>where
V: ?Sized,
impl<'a, V> UnsafeUnpin for ReleaseGate<'a, V>where
V: ?Sized,
impl<'a, V> UnwindSafe for ReleaseGate<'a, V>where
V: RefUnwindSafe + ?Sized,
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
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§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>
Converts
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>
Converts
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