pub struct FlightsRequestBuilder { /* private fields */ }Implementations§
Source§impl FlightsRequestBuilder
impl FlightsRequestBuilder
pub fn new(login: Option<Arc<(String, String)>>, begin: u64, end: u64) -> Self
Sourcepub fn in_interval(&mut self, begin: u64, end: u64) -> &mut Self
pub fn in_interval(&mut self, begin: u64, end: u64) -> &mut Self
This method is redundant, but can be used to reuse the same FlightsRequestBuilder multiple times to create different requests. This sets the beginning and end of the flight request interval. The beginning and ending times are numbers that represent times in seconds since the Unix Epoch.
The interval must not span greater than 2 hours, otherwise the request will fail.
Sourcepub fn by_aircraft(&mut self, address: String) -> &mut Self
pub fn by_aircraft(&mut self, address: String) -> &mut Self
This method can be used to filter the flight data by a specific aircraft. The aircraft ICAO24 address is in hex string representation.
Sourcepub fn by_arrival(&mut self, airport_icao: String) -> &mut Self
pub fn by_arrival(&mut self, airport_icao: String) -> &mut Self
This method can be used to filter the flight data by a arrival airport. The airport ICAO code is a 4-letter string.
Sourcepub fn by_departure(&mut self, airport_icao: String) -> &mut Self
pub fn by_departure(&mut self, airport_icao: String) -> &mut Self
This method can be used to filter the flight data by departure airport.
Sourcepub fn consume(self) -> FlightsRequest
pub fn consume(self) -> FlightsRequest
Consumes this FlightsRequestBuilder and returns a new FlightsRequest. If this FlightsRequestBuilder could be used again effectively, then the finish() method should be called instead because that will allow this to be reused.
Sourcepub fn finish(&self) -> FlightsRequest
pub fn finish(&self) -> FlightsRequest
Returns the FlightsRequest that this FlightsRequestBuilder has created. This clones the inner FlightsRequest. If this FlightsRequestBuilder will be only used once, the consume() method should be used instead which will only move the inner value instead of calling clone()
Trait Implementations§
Source§impl Clone for FlightsRequestBuilder
impl Clone for FlightsRequestBuilder
Source§fn clone(&self) -> FlightsRequestBuilder
fn clone(&self) -> FlightsRequestBuilder
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more