[−][src]Struct trenitalia::Trenitalia
Methods
impl Trenitalia
[src]
pub fn new() -> Trenitalia
[src]
Creates a new Trenitalia instance
pub fn find_trips(
&self,
from: &TrainStation,
to: &TrainStation,
when: &DateTime<Local>
) -> Vec<Vec<TrainTrip>>
[src]
&self,
from: &TrainStation,
to: &TrainStation,
when: &DateTime<Local>
) -> Vec<Vec<TrainTrip>>
Find a trip between two stations using ViaggiaTreno API and falling back to LeFrecce
pub fn find_train_station_online(&self, name: &str) -> Option<&TrainStation>
[src]
Call to the ViaggiaTreno station lookup API
pub fn get_train_station(&self, id: &str) -> Option<&TrainStation>
[src]
Return a station object reference that has the requested ID
pub fn find_train_station(&self, name: &str) -> Option<&TrainStation>
[src]
Look for a train station
pub fn train_info(&self, number: u32, from: String) -> Result<TrainInfo, &str>
[src]
Get train details, provided that you know the originating station
pub fn train_info_calling_at(
&self,
number: u32,
calling_at: &TrainStation
) -> Result<TrainInfo, &str>
[src]
&self,
number: u32,
calling_at: &TrainStation
) -> Result<TrainInfo, &str>
Get train details, knowing that it calls at a certain station
pub fn nearest_station(&self, point: (f64, f64)) -> &TrainStation
[src]
Finds the nearest station from a point
Auto Trait Implementations
impl RefUnwindSafe for Trenitalia
impl Send for Trenitalia
impl Sync for Trenitalia
impl Unpin for Trenitalia
impl UnwindSafe for Trenitalia
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,