rusmpp_core/values/
ms_availability_status.rs

1use rusmpp_macros::Rusmpp;
2
3/// The ms_availability_status parameter is used in the alert_notification operation to indicate the
4/// availability state of the MS to the ESME.
5///
6/// If the MC does not include the parameter in the alert_notification operation, the ESME should
7/// assume that the MS is in an “available” state.
8#[repr(u8)]
9#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord, Default, Rusmpp)]
10#[cfg_attr(feature = "arbitrary", derive(::arbitrary::Arbitrary))]
11#[cfg_attr(feature = "serde", derive(::serde::Serialize))]
12#[cfg_attr(feature = "serde-deserialize-unchecked", derive(::serde::Deserialize))]
13pub enum MsAvailabilityStatus {
14    #[default]
15    Available = 0,
16    Denied = 1,
17    Unavailable = 2,
18    Other(u8),
19}
20
21#[cfg(test)]
22mod tests {
23    use super::*;
24
25    #[test]
26    fn encode_decode() {
27        #[cfg(feature = "alloc")]
28        crate::tests::owned::encode_decode_test_instances::<MsAvailabilityStatus>();
29        crate::tests::borrowed::encode_decode_test_instances::<MsAvailabilityStatus>();
30    }
31}