beggar 0.6.0

A no_std, protocol-independent recovery registry: a recovery is a collection of chunks -- log entries or a snapshot's pieces -- and beggar accounts for which have moved, at both ends of a transfer, to completion or to a cancellation for the caller's own reason; its sessions, what each still lacks, and the finished ones it retains can be queried.
Documentation
// Copyright (c) 2026 Umberto Gotti
// SPDX-License-Identifier: MIT

use crate::checkpoint::Checkpoint;
use crate::rejection::Rejection;
use crate::session_id::SessionId;
use crate::session_record::SessionRecord;
use alloc::vec::Vec;
use core::ops::RangeInclusive;

// What happened: past participle, as every output is.
#[derive(Debug, Clone, PartialEq, Eq)]
pub enum Output<R> {
    RecoveryStarted {
        session_id: SessionId,
    },
    RecoveryAdvanced {
        held: u64,
        chunks: u64,
    },
    RecoveryCompleted,
    RecoveryCancelled(R),
    RecoveryUnaffected,
    RecoveryNotStarted,
    RecoveryConflicted {
        chunks: u64,
        sender: u64,
        receiver: u64,
    },
    RecoveryRejected(Rejection),
    RecoveriesListed {
        sessions: Vec<SessionId>,
    },
    RecoveryShown {
        record: SessionRecord,
        finished: Option<u64>,
    },
    MissingChunksListed {
        missing: Vec<RangeInclusive<u64>>,
    },
    RegistryShown(Checkpoint),
}