riffdb_errors/
replication.rs1#[derive(Clone, Copy, Debug, Eq, PartialEq)]
5pub enum ReplicationStreamErrorV3 {
6 ForeignLineage,
8 StaleEpoch,
10 HistoryPruned,
12 UnsupportedFormat,
14 UnsupportedCatalog,
16 UnsupportedBounds,
18 InvalidPosition,
20 CorruptHistory,
22 Unavailable,
24}
25
26impl std::fmt::Display for ReplicationStreamErrorV3 {
27 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
28 f.write_str(match self {
29 Self::ForeignLineage => "foreign replication lineage",
30 Self::StaleEpoch => "stale replication epoch",
31 Self::HistoryPruned => "replication history has been pruned",
32 Self::UnsupportedFormat => "unsupported replication format",
33 Self::UnsupportedCatalog => "unsupported replication catalog",
34 Self::UnsupportedBounds => "unsupported replication bounds",
35 Self::InvalidPosition => "invalid replication resume position",
36 Self::CorruptHistory => "invalid replication history",
37 Self::Unavailable => "replication source is unavailable",
38 })
39 }
40}
41
42impl std::error::Error for ReplicationStreamErrorV3 {}