Struct sounding_base::StationInfo [−][src]
pub struct StationInfo { /* fields omitted */ }Station information including location data and identification number.
Methods
impl StationInfo[src]
impl StationInfopub fn new_with_values<T, U, V>(
station_num: T,
location: U,
elevation: V
) -> Self where
T: Into<Optioned<i32>>,
U: Into<Option<(f64, f64)>>,
V: Into<Optioned<f64>>, [src]
pub fn new_with_values<T, U, V>(
station_num: T,
location: U,
elevation: V
) -> Self where
T: Into<Optioned<i32>>,
U: Into<Option<(f64, f64)>>,
V: Into<Optioned<f64>>, Create a new StationInfo object.
Arguments
station_num: The USAF station identifier, or None.
location: The latitude and longitude as a tuple, or None.
elevation: The elevation of the station in meters.
Examples
use sounding_base::StationInfo; use optional::{some, none}; let stn = StationInfo::new_with_values(12345, (45.2,-113.5), 2000.0); // Note that lat-lon is an `Option` and not an `Optioned` let stn = StationInfo::new_with_values(some(12345), None, none());
pub fn new() -> Self[src]
pub fn new() -> SelfCreate a new object with default values.
Examples
use sounding_base::StationInfo; use optional::{some, none}; assert_eq!(StationInfo::new().station_num(), none()); assert_eq!(StationInfo::new().location(), None); assert_eq!(StationInfo::new().elevation(), none());
pub fn with_station<T>(self, number: T) -> Self where
Optioned<i32>: From<T>, [src]
pub fn with_station<T>(self, number: T) -> Self where
Optioned<i32>: From<T>, Builder method to add a station number.
pub fn with_lat_lon<T>(self, coords: T) -> Self where
Option<(f64, f64)>: From<T>, [src]
pub fn with_lat_lon<T>(self, coords: T) -> Self where
Option<(f64, f64)>: From<T>, Builder method to add a location.
pub fn with_elevation<T>(self, elev: T) -> Self where
Optioned<f64>: From<T>, [src]
pub fn with_elevation<T>(self, elev: T) -> Self where
Optioned<f64>: From<T>, Builder method to add elevation.
pub fn station_num(&self) -> Optioned<i32>[src]
pub fn station_num(&self) -> Optioned<i32>station number, USAF number, eg 727730
pub fn location(&self) -> Option<(f64, f64)>[src]
pub fn location(&self) -> Option<(f64, f64)>Latitude and longitude.
pub fn elevation(&self) -> Optioned<f64>[src]
pub fn elevation(&self) -> Optioned<f64>Elevation in meters, this may be in model terrain, not necessarily the same as the real world.
Trait Implementations
impl Debug for StationInfo[src]
impl Debug for StationInfofn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl Clone for StationInfo[src]
impl Clone for StationInfofn clone(&self) -> StationInfo[src]
fn clone(&self) -> StationInfoReturns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)Performs copy-assignment from source. Read more
impl Copy for StationInfo[src]
impl Copy for StationInfoimpl PartialEq for StationInfo[src]
impl PartialEq for StationInfofn eq(&self, other: &StationInfo) -> bool[src]
fn eq(&self, other: &StationInfo) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &StationInfo) -> bool[src]
fn ne(&self, other: &StationInfo) -> boolThis method tests for !=.
impl Default for StationInfo[src]
impl Default for StationInfofn default() -> StationInfo[src]
fn default() -> StationInfoReturns the "default value" for a type. Read more
Auto Trait Implementations
impl Send for StationInfo
impl Send for StationInfoimpl Sync for StationInfo
impl Sync for StationInfo