1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
/// Chooses if some payment data is send to the provider.
#[derive(Debug, PartialEq, Eq, Clone, Copy, Hash)]
#[must_use]
pub enum SendToProviderState {
    /// The data will be sent.
    Send,
    /// The data won't be sent.
    DoNotSend,
}

impl SendToProviderState {
    /// Checks if `self` is `Send`.
    #[must_use]
    pub fn should_send(self) -> bool {
        self == Self::Send
    }
}