Skip to main content

mimir_node_map/
refusal.rs

1// SPDX-License-Identifier: MIT OR Apache-2.0
2//! Diagnostic refusals carry no acceptance evidence.
3use serde::{Deserialize, Serialize};
4
5#[derive(Clone, Copy, Debug, PartialEq, Eq, Serialize, Deserialize)]
6#[serde(rename_all = "kebab-case")]
7pub enum BindingRefusalKind {
8    MergedUnknownExtent,
9}
10impl BindingRefusalKind {
11    pub fn name(self) -> &'static str {
12        match self {
13            Self::MergedUnknownExtent => "merged-unknown-extent",
14        }
15    }
16}
17
18#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
19pub struct BindingRefusal {
20    pub address: u64,
21    pub reason: BindingRefusalKind,
22}
23
24#[derive(Clone, Debug, Default, PartialEq, Eq, Serialize, Deserialize)]
25pub struct BindingRefusals {
26    /// Functions whose extent is unavailable; no inferred range is recorded.
27    pub functions: Vec<BindingRefusal>,
28    /// R1 candidate addresses affected by incomplete evidence. This does not
29    /// assign an address to one of the functions above: missing caller extents
30    /// also prevent the exhaustive no-stand-in check.
31    pub addresses: Vec<BindingRefusal>,
32}