made_core/ports/
host_activation_outcome.rs1use crate::value_objects::{DeliveryFailureReason, HostActivationReceipt};
2
3#[derive(Debug, Clone, PartialEq, Eq)]
10pub enum HostActivationOutcome {
11 Accepted(HostActivationReceipt),
13 Unsupported,
15 Failed(DeliveryFailureReason),
17}
18
19impl HostActivationOutcome {
20 #[must_use]
21 pub const fn receipt(&self) -> Option<&HostActivationReceipt> {
22 match self {
23 Self::Accepted(receipt) => Some(receipt),
24 Self::Unsupported | Self::Failed(_) => None,
25 }
26 }
27
28 #[must_use]
29 pub const fn is_accepted(&self) -> bool {
30 matches!(self, Self::Accepted(_))
31 }
32}