pub struct GTFSCalendar {
pub service_id: String,
pub monday: i8,
pub tuesday: i8,
pub wednesday: i8,
pub thursday: i8,
pub friday: i8,
pub saturday: i8,
pub sunday: i8,
pub start_date: String,
pub end_date: String,
}Expand description
§Calendar Information
Conditionally Required
Defines a set of dates when service is available for one or more routes.
Required unless all dates of service are defined in calendar_dates.txt.
Fields§
§service_id: StringRequired Identifies a set of dates when service is available.
monday: i8Required Service availability on Mondays: 0 or 1.
tuesday: i8Required Service availability on Tuesdays: 0 or 1.
wednesday: i8Required Service availability on Wednesdays: 0 or 1.
thursday: i8Required Service availability on Thursdays: 0 or 1.
friday: i8Required Service availability on Fridays: 0 or 1.
saturday: i8Required Service availability on Saturdays: 0 or 1.
sunday: i8Required Service availability on Sundays: 0 or 1.
start_date: StringRequired Start service day (inclusive) for the interval. Format: YYYYMMDD
end_date: StringRequired End service day (inclusive) for the interval. Format: YYYYMMDD
Implementations§
Source§impl GTFSCalendar
impl GTFSCalendar
Sourcepub fn new(source: &str) -> Vec<GTFSCalendar>
pub fn new(source: &str) -> Vec<GTFSCalendar>
Create a new GTFSCalendar
Sourcepub fn monday(&self) -> GTFSDayAvailability
pub fn monday(&self) -> GTFSDayAvailability
Get the availability for Monday
Sourcepub fn tuesday(&self) -> GTFSDayAvailability
pub fn tuesday(&self) -> GTFSDayAvailability
Get the availability for Tuesday
Sourcepub fn wednesday(&self) -> GTFSDayAvailability
pub fn wednesday(&self) -> GTFSDayAvailability
Get the availability for Wednesday
Sourcepub fn thursday(&self) -> GTFSDayAvailability
pub fn thursday(&self) -> GTFSDayAvailability
Get the availability for Thursday
Sourcepub fn friday(&self) -> GTFSDayAvailability
pub fn friday(&self) -> GTFSDayAvailability
Get the availability for Friday
Sourcepub fn saturday(&self) -> GTFSDayAvailability
pub fn saturday(&self) -> GTFSDayAvailability
Get the availability for Saturday
Sourcepub fn sunday(&self) -> GTFSDayAvailability
pub fn sunday(&self) -> GTFSDayAvailability
Get the availability for Sunday
Sourcepub fn start_date(&self) -> Date
pub fn start_date(&self) -> Date
Get the start date
Trait Implementations§
Source§impl Clone for GTFSCalendar
impl Clone for GTFSCalendar
Source§fn clone(&self) -> GTFSCalendar
fn clone(&self) -> GTFSCalendar
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for GTFSCalendar
impl Debug for GTFSCalendar
Source§impl Default for GTFSCalendar
impl Default for GTFSCalendar
Source§fn default() -> GTFSCalendar
fn default() -> GTFSCalendar
Source§impl From<&Map<String, ValueType>> for GTFSCalendar
Starting from a ref to an MValue, convert to a struct
impl From<&Map<String, ValueType>> for GTFSCalendar
Starting from a ref to an MValue, convert to a struct
Source§impl From<&ValueType> for GTFSCalendar
If this struct ref is nested into another struct, pull out the MValue and let
From handle
impl From<&ValueType> for GTFSCalendar
If this struct ref is nested into another struct, pull out the MValue and let
From
Source§impl From<GTFSCalendar> for MValue
Starting from a struct, convert to an MValue
impl From<GTFSCalendar> for MValue
Starting from a struct, convert to an MValue
Source§fn from(value: GTFSCalendar) -> MValue
fn from(value: GTFSCalendar) -> MValue
Source§impl From<GTFSCalendar> for ValueType
If this struct is nested into another struct, convert to a ValueType that’s nested
impl From<GTFSCalendar> for ValueType
If this struct is nested into another struct, convert to a ValueType that’s nested
Source§fn from(value: GTFSCalendar) -> ValueType
fn from(value: GTFSCalendar) -> ValueType
Source§impl From<Map<String, ValueType>> for GTFSCalendar
Starting from an MValue, convert to a struct
impl From<Map<String, ValueType>> for GTFSCalendar
Starting from an MValue, convert to a struct
Source§impl From<ValueType> for GTFSCalendar
If this struct is nested into another struct, pull out the MValue and let
From handle
impl From<ValueType> for GTFSCalendar
If this struct is nested into another struct, pull out the MValue and let
From
Source§impl PartialEq for GTFSCalendar
impl PartialEq for GTFSCalendar
impl MValueCompatible for GTFSCalendar
Finally implement the MValueCompatible trait
impl StructuralPartialEq for GTFSCalendar
Auto Trait Implementations§
impl Freeze for GTFSCalendar
impl RefUnwindSafe for GTFSCalendar
impl Send for GTFSCalendar
impl Sync for GTFSCalendar
impl Unpin for GTFSCalendar
impl UnwindSafe for GTFSCalendar
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().