pub trait ProtectCallback:
Send
+ Sync
+ 'static {
// Required method
fn protect(&self) -> Option<Vec<Key>>;
}Expand description
A registered protect callback — ADR-005 §Marks 3’s protection source, consulted pre-sweep and at direct-delete arbitration.
Named design point — the callback shape: one sync verb returning
the protection set or a failure to answer. None means the
protection source could not answer, and every consumer of that
answer takes the safe side (iroh’s ProtectOutcome::Abort
conclusion, adopted): a sweep aborts with
GcAbortCause::ProtectFailed, nothing deleted (ADR-012 §1:
abort is report data); a direct delete refuses conservatively with
Error::GcRefuse — nothing deleted either way. The verb is sync by
the same discipline as LivenessSource (direct-delete
arbitration runs it under the arbitration lock — quick, never
blocking); mark-time consults run outside the lock and may be
slower.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".