pub enum PriorityFlagType {
GsmSms(GsmSms),
GsmCbs(GsmCbs),
Ansi136(Ansi136),
Is95(Is95),
Ansi41Cbs(Ansi41Cbs),
}Expand description
Helper for creating a priority_flag.
A priority flag type can not be created from u8. Depending on the variant you want to create, you need to use the variant itself.
§Example
use rusmpp_core::values::{GsmSms, PriorityFlag, PriorityFlagType};
let gsm_sms = GsmSms::from(1);
assert_eq!(gsm_sms, GsmSms::Priority1);
let priority_flag_type = PriorityFlagType::from(gsm_sms);
assert!(matches!(priority_flag_type, PriorityFlagType::GsmSms(GsmSms::Priority1)));
let priority_flag = PriorityFlag::from(priority_flag_type);
assert_eq!(priority_flag, PriorityFlag::new(1));
let priority_flag: PriorityFlag = GsmSms::from(1).into();
assert_eq!(priority_flag, PriorityFlag::new(1));Variants§
Trait Implementations§
Source§impl Clone for PriorityFlagType
impl Clone for PriorityFlagType
Source§fn clone(&self) -> PriorityFlagType
fn clone(&self) -> PriorityFlagType
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for PriorityFlagType
Source§impl Debug for PriorityFlagType
impl Debug for PriorityFlagType
impl Eq for PriorityFlagType
Source§impl From<Ansi41Cbs> for PriorityFlagType
impl From<Ansi41Cbs> for PriorityFlagType
Source§fn from(value: Ansi41Cbs) -> PriorityFlagType
fn from(value: Ansi41Cbs) -> PriorityFlagType
Converts to this type from the input type.
Source§impl From<Ansi136> for PriorityFlagType
impl From<Ansi136> for PriorityFlagType
Source§fn from(value: Ansi136) -> PriorityFlagType
fn from(value: Ansi136) -> PriorityFlagType
Converts to this type from the input type.
Source§impl From<GsmCbs> for PriorityFlagType
impl From<GsmCbs> for PriorityFlagType
Source§fn from(value: GsmCbs) -> PriorityFlagType
fn from(value: GsmCbs) -> PriorityFlagType
Converts to this type from the input type.
Source§impl From<GsmSms> for PriorityFlagType
impl From<GsmSms> for PriorityFlagType
Source§fn from(value: GsmSms) -> PriorityFlagType
fn from(value: GsmSms) -> PriorityFlagType
Converts to this type from the input type.
Source§impl From<Is95> for PriorityFlagType
impl From<Is95> for PriorityFlagType
Source§fn from(value: Is95) -> PriorityFlagType
fn from(value: Is95) -> PriorityFlagType
Converts to this type from the input type.
Source§impl From<PriorityFlagType> for PriorityFlag
impl From<PriorityFlagType> for PriorityFlag
Source§fn from(value: PriorityFlagType) -> PriorityFlag
fn from(value: PriorityFlagType) -> PriorityFlag
Converts to this type from the input type.
Source§impl Hash for PriorityFlagType
impl Hash for PriorityFlagType
Source§impl Ord for PriorityFlagType
impl Ord for PriorityFlagType
Source§fn cmp(&self, other: &PriorityFlagType) -> Ordering
fn cmp(&self, other: &PriorityFlagType) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for PriorityFlagType
impl PartialEq for PriorityFlagType
Source§impl PartialOrd for PriorityFlagType
impl PartialOrd for PriorityFlagType
impl StructuralPartialEq for PriorityFlagType
Auto Trait Implementations§
impl Freeze for PriorityFlagType
impl RefUnwindSafe for PriorityFlagType
impl Send for PriorityFlagType
impl Sync for PriorityFlagType
impl Unpin for PriorityFlagType
impl UnsafeUnpin for PriorityFlagType
impl UnwindSafe for PriorityFlagType
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more