1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
// SPDX-License-Identifier: AGPL-3.0-only
// Copyright (C) 2026 Vallés Puig, Ramon
//! Error type for the NSB crate.
//!
//! Scientific role:
//! scientific code is only as trustworthy as its failure modes. This module
//! defines the explicit ways the NSB calculation can fail: malformed bundled
//! reference data, invalid geometry/ranges, unsupported model requests, or
//! interpolation issues.
//!
//! Contribution to the science:
//! by separating parse, range, and interpolation failures, this
//! file helps users distinguish between "the sky model says the answer is X"
//! and "the model could not be evaluated reliably for this input or dataset."
use Error;
/// Failures returned by NSB model construction and evaluation.
///
/// This enum is `#[non_exhaustive]`: new variants may be added in minor
/// releases. Supported callers should match the documented variants they handle
/// and keep a wildcard arm.
///
/// Existing variant shapes and field payloads are part of the public contract.
/// Adding fields to an existing variant is a breaking change unless that
/// variant is separately redesigned for extensibility. Treat `Display` and
/// `source()` as the stable diagnostic interfaces for logging and reporting.
/// Crate result alias.
pub type Result<T> = Result;