[][src]Struct callpass::Callpass

pub struct Callpass(_);

This type will generate and represent an APRS-IS passcode.

Callpass generation

When given a callsign, an APRS-IS passcode will be generated.

let callpass: Callpass = "x2yz".into();

Comparisons

Its value can be directly compared to other numbers.

assert!(callpass == 29322);

Representation

A Callpass can be used in place of integers.

let given_passcode: Callpass = 29322.into();
assert!(callpass == given_passcode);

A Callpass can also be used as an integer where required.

fn i64_eater(lunch: i64) {}

i64_eater(callpass.into())

Modification

A Callpass will not allow modification (without being casted).

This example deliberately fails to compile
let changed_callpass = callpass + 4;
This example deliberately fails to compile
callpass.0 = 12345;

Trait Implementations

impl From<u16> for Callpass
[src]

impl From<i16> for Callpass
[src]

impl From<u32> for Callpass
[src]

impl From<i32> for Callpass
[src]

impl From<u64> for Callpass
[src]

impl From<i64> for Callpass
[src]

impl<'a> From<&'a u16> for Callpass
[src]

impl<'a> From<&'a i16> for Callpass
[src]

impl<'a> From<&'a u32> for Callpass
[src]

impl<'a> From<&'a i32> for Callpass
[src]

impl<'a> From<&'a u64> for Callpass
[src]

impl<'a> From<&'a i64> for Callpass
[src]

impl From<String> for Callpass
[src]

impl<'a> From<&'a String> for Callpass
[src]

impl<'a> From<&'a str> for Callpass
[src]

impl Eq for Callpass
[src]

impl Into<u16> for Callpass
[src]

impl Into<i16> for Callpass
[src]

impl Into<u32> for Callpass
[src]

impl Into<i32> for Callpass
[src]

impl Into<u64> for Callpass
[src]

impl Into<i64> for Callpass
[src]

impl Into<String> for Callpass
[src]

impl PartialOrd<Callpass> for Callpass
[src]

impl PartialEq<Callpass> for Callpass
[src]

impl PartialEq<u16> for Callpass
[src]

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests for !=.

impl PartialEq<i16> for Callpass
[src]

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests for !=.

impl PartialEq<u32> for Callpass
[src]

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests for !=.

impl PartialEq<i32> for Callpass
[src]

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests for !=.

impl PartialEq<u64> for Callpass
[src]

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests for !=.

impl PartialEq<i64> for Callpass
[src]

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests for !=.

impl Clone for Callpass
[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Ord for Callpass
[src]

fn max(self, other: Self) -> Self
1.21.0
[src]

Compares and returns the maximum of two values. Read more

fn min(self, other: Self) -> Self
1.21.0
[src]

Compares and returns the minimum of two values. Read more

impl Debug for Callpass
[src]

impl Display for Callpass
[src]

Auto Trait Implementations

impl Send for Callpass

impl Sync for Callpass

Blanket Implementations

impl<T> From for T
[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]