appcore-sdk 1.0.2-rc.4

Documented application facade for AppCore
Documentation
// =============================================================================
//        #######
//     ###       ###     F: availability.rs
//    ##   ## ##   ##    P: AppCore-Runtime
//         ## ##
//                       C: 2026/11/09 00:00:00 by dnettoRaw
//    ##   ## ##   ##    U: 2026/11/09 00:00:00 by dnettoRaw
//      ###########      S: 1.0.2-rc.3
// =============================================================================

//! Consume typed availability and durable outcomes without importing an HTTP host.
use appcore_sdk::sync::{
    AvailabilityErrorV1, AvailabilityRetryV1, PeerOperationCallErrorV1, PeerOperationOutcomeV1,
};

fn main() {
    let busy = AvailabilityErrorV1::Busy {
        retry_after_ms: 100,
    };
    assert!(matches!(
        busy.retry(1, 73),
        AvailabilityRetryV1::RetryAfter { .. }
    ));
    let pending = PeerOperationOutcomeV1::Pending {
        reason: AvailabilityErrorV1::ReplicaCommitFailed,
    };
    assert!(pending.category().is_some());
    let transport_failure: Result<PeerOperationOutcomeV1, PeerOperationCallErrorV1> =
        Err(PeerOperationCallErrorV1::TransportUnavailable);
    assert!(transport_failure.is_err());
}