Skip to main content

CallSign

Struct CallSign 

Source
pub struct CallSign { /* private fields */ }
Expand description

In general an amateur radio callsign is of one of these forms where:

  • P – prefix character (letter or numeral, subject to exclusions below). Prefixes can be formed using one-letter, two-letters, a digit and a letter, a letter and a digit, or in rare cases a digit and two letters. There is no ITU allocation of digit-only prefixes. Letter-digit-letter prefixes are possible but there are no known cases of them being issued by national bodies.

  • N – a single numeral which separates prefix from suffix (any digit from 0 to 9). Often a cross-hatched Ø is used for the numeral zero to distinguish it from the letter O.

  • S – suffix character (letter or numeral, last character must be a letter). Digits are in practise used sparingly in suffixes and almost always for special events. This avoids confusion with separating numerals and digits in prefixes in regularly issued call signs.

    From Wikipedia

Implementations§

Source§

impl CallSign

Source

pub fn new<S1: Into<String>, N: Into<u8>, S2: Into<String>>( prefix: S1, separator: N, suffix: S2, ) -> Self

Source

pub fn with_ancillary_prefix<S: Into<String>>(self, prefix: S) -> Self

Source

pub fn with_ancillary_suffix<S: Into<String>>(self, suffix: S) -> Self

Source

pub fn ancillary_prefix(&self) -> Option<&String>

Source

pub fn prefix(&self) -> &String

Source

pub fn separator_numeral(&self) -> u8

Source

pub fn suffix(&self) -> &String

Source

pub fn ancillary_suffix(&self) -> Option<&String>

Source

pub fn is_valid(s: &str) -> bool

Returns true if s matches the ITU callsign pattern.

Source

pub fn is_special(&self) -> bool

Returns true if this is a special-event or commemorative callsign — i.e. the suffix is longer than four characters or ends with a digit.

Source

pub fn is_prefix_non_standard(&self) -> bool

Returns true if the prefix appears in the list of non-standard or unrecognised-entity prefixes tracked by this library.

Source

pub fn is_at_alternate_location(&self) -> bool

Returns true when the /A ancillary suffix indicates operation from an alternate licensed location.

Source

pub fn is_portable(&self) -> bool

Returns true when the /P ancillary suffix indicates portable operation.

Source

pub fn is_mobile(&self) -> bool

Returns true when the /M ancillary suffix indicates mobile operation.

Source

pub fn is_aeronautical_mobile(&self) -> bool

Returns true when the /AM ancillary suffix indicates aeronautical mobile operation.

Source

pub fn is_maritime_mobile(&self) -> bool

Returns true when the /MM ancillary suffix indicates maritime mobile operation.

Source

pub fn is_operating_qrp(&self) -> bool

Returns true when the /QRP ancillary suffix indicates the station is operating at QRP power levels (typically ≤5 W).

Source

pub fn is_fcc_license_pending(&self) -> bool

Returns true when the /AG or /AE ancillary suffix indicates a pending FCC licence upgrade.

Trait Implementations§

Source§

impl Clone for CallSign

Source§

fn clone(&self) -> CallSign

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for CallSign

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for CallSign
where Self: FromStr, <Self as FromStr>::Err: Display,

Source§

fn deserialize<__D>(deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Display for CallSign

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl FromStr for CallSign

Source§

type Err = CoreError

The associated error which can be returned from parsing.
Source§

fn from_str(s: &str) -> Result<Self, Self::Err>

Parses a string s to return a value of this type. Read more
Source§

impl PartialEq for CallSign

Source§

fn eq(&self, other: &CallSign) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for CallSign
where Self: Display,

Source§

fn serialize<__S>(&self, serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl Eq for CallSign

Source§

impl StructuralPartialEq for CallSign

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,