Struct openaip::AltitudeLimit[][src]

pub struct AltitudeLimit {
    pub reference: AltitudeReference,
    pub unit: AltitudeUnit,
    pub value: i32,
}
Expand description

Examples

let limit1 = AltitudeLimit::new(4500, AltitudeUnit::Feet, AltitudeReference::MSL);

let limit2 = AltitudeLimit::new(65, AltitudeUnit::FlightLevel, AltitudeReference::STD);

Fields

reference: AltitudeReferenceunit: AltitudeUnitvalue: i32

Implementations

Trait Implementations

Formats the value using the given formatter. Read more

Examples

let limit = AltitudeLimit::new(4500, AltitudeUnit::Feet, AltitudeReference::MSL);
assert_eq!(format!("{}", limit), "4500ft MSL");

let limit = AltitudeLimit::new(65, AltitudeUnit::FlightLevel, AltitudeReference::STD);
assert_eq!(format!("{}", limit), "FL65");

let limit = AltitudeLimit::new(1500, AltitudeUnit::Feet, AltitudeReference::GND);
assert_eq!(format!("{}", limit), "1500ft GND");

let limit = AltitudeLimit::new(0, AltitudeUnit::Feet, AltitudeReference::GND);
assert_eq!(format!("{}", limit), "GND");

The type returned in the event of a conversion error.

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.