pub enum ResolveOutcome {
Success(ResolvedData),
IntegrityFailure,
Unreachable,
}Expand description
The typed result of a resolve. The three cases are exhaustive and never conflated (see the module docs).
Variants§
Success(ResolvedData)
Verified, decrypted content.
IntegrityFailure
The served bytes failed integrity verification — a hard, fail-closed security failure. The unverified bytes are NEVER carried here.
Unreachable
Every transport tier was unreachable — a friendly, retryable network state.
Implementations§
Source§impl ResolveOutcome
impl ResolveOutcome
Sourcepub fn is_success(&self) -> bool
pub fn is_success(&self) -> bool
true iff this is verified content.
Sourcepub fn data(&self) -> Option<&ResolvedData>
pub fn data(&self) -> Option<&ResolvedData>
The verified data, if this is a success.
Sourcepub fn kind(&self) -> &'static str
pub fn kind(&self) -> &'static str
A stable machine-readable tag: "success" / "integrity_failure" /
"unreachable" (for the wasm surface + logging).
Sourcepub fn render(&self, connect_url: &str) -> ResolvedData
pub fn render(&self, connect_url: &str) -> ResolvedData
The renderable payload for a webview: the verified content for a success, or
the appropriate branded text/html page for a non-success outcome. This is
the ONLY way a non-success outcome yields bytes — an integrity failure
renders the “Integrity Verification Failed” page, NEVER the unverified bytes.
Trait Implementations§
Source§impl Clone for ResolveOutcome
impl Clone for ResolveOutcome
Source§fn clone(&self) -> ResolveOutcome
fn clone(&self) -> ResolveOutcome
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more