pub enum LegType<'a> {
Timed(&'a TimedLeg),
Transfer(&'a TransferLeg),
Continuous(&'a ContinuousLeg),
}Variants§
Implementations§
Source§impl<'a> LegType<'a>
impl<'a> LegType<'a>
pub fn duration(&'a self) -> TimeDelta
pub fn departure_time(&'a self) -> Option<NaiveDateTime>
pub fn arrival_time(&'a self) -> Option<NaiveDateTime>
pub fn departure_stop(&'a self) -> &'a str
pub fn arrival_stop(&'a self) -> &'a str
pub fn departure_id(&'a self) -> Result<i32, OjpError>
pub fn arrival_id(&'a self) -> Result<i32, OjpError>
pub fn mode(&self) -> &str
Auto Trait Implementations§
impl<'a> Freeze for LegType<'a>
impl<'a> RefUnwindSafe for LegType<'a>
impl<'a> Send for LegType<'a>
impl<'a> Sync for LegType<'a>
impl<'a> Unpin for LegType<'a>
impl<'a> UnwindSafe for LegType<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more