Skip to main content

verdict

Function verdict 

Source
pub fn verdict(
    request: &Request,
    here: &str,
    now_ms: i64,
    ledger: &Ledger,
    region: Option<&Region>,
    standing: &dyn Fn(&str) -> Standing,
) -> Verdict
Expand description

The never-twice decision, step for step: another phone’s; decided already (the ledger holds the key, whatever the sharing read again); written by a computer of an older Sioul after this phone began to check writers (“old-computer”); asked by a device gone from the sharing (standing: it left, you forgot it, another device replaces it: “not-counted”), or one it does not know yet, which waits while its request is fresh (Verdict::Wait; then dated ahead or expired, as below); refused (refusal, a multimedia message’s refusal_mms); written before the ledger’s mark; dated ahead of the phone’s clock; older than EXPIRY_MS; else sent. The time written is corrected by how far the writer’s clock may run ahead (Request::ahead, measured by the writer as an upper bound: a request looks older, never younger). standing is asked only of a request not decided yet.