pub struct GTFSBookingRule {Show 15 fields
pub booking_rule_id: String,
pub booking_type: i8,
pub prior_notice_duration_min: Option<i32>,
pub prior_notice_duration_max: Option<i32>,
pub prior_notice_last_day: Option<i32>,
pub prior_notice_last_time: Option<String>,
pub prior_notice_start_day: Option<i32>,
pub prior_notice_start_time: Option<String>,
pub prior_notice_service_id: Option<String>,
pub message: Option<String>,
pub pickup_message: Option<String>,
pub drop_off_message: Option<String>,
pub phone_number: Option<String>,
pub info_url: Option<String>,
pub booking_url: Option<String>,
}Expand description
§Booking Rules
Optional Defines rules for booking rider-requested services. Useful when a trip or stop_time requires advanced scheduling (e.g., dial-a-ride, on-demand pickup).
Primary Key: (booking_rule_id)
Fields§
§booking_rule_id: StringRequired
Identifies a booking rule (booking_rule_id).
booking_type: i8Required Indicates how far in advance booking can be made. 0 = Real-time, 1 = Same-day, 2 = Prior-day(s)
prior_notice_duration_min: Option<i32>Conditionally Required Minimum number of minutes before travel to make the request. Required for booking_type=1; forbidden otherwise.
prior_notice_duration_max: Option<i32>Conditionally Forbidden Maximum number of minutes before travel to make the same-day request.
- Forbidden for booking_type=0 or booking_type=2
- Optional for booking_type=1
prior_notice_last_day: Option<i32>Conditionally Required Last day before travel to make booking request. E.g., 1 = 1 day in advance. Required for booking_type=2; forbidden otherwise.
prior_notice_last_time: Option<String>Conditionally Required Last time on the last day before travel to make booking request, e.g. “17:00:00”. Required if prior_notice_last_day is defined; forbidden otherwise.
prior_notice_start_day: Option<i32>Conditionally Forbidden Earliest day before travel to make booking request.
- Forbidden for booking_type=0.
- Forbidden for booking_type=1 if prior_notice_duration_max is defined.
- Optional otherwise (mainly for booking_type=2).
prior_notice_start_time: Option<String>Conditionally Required Earliest time on the earliest day before travel, e.g. “00:00:00”. Required if prior_notice_start_day is defined; forbidden otherwise.
prior_notice_service_id: Option<String>Conditionally Forbidden
Service days on which last_day / start_day are counted (calendar.service_id).
- Optional if booking_type=2.
- Forbidden otherwise.
message: Option<String>Optional Generic message to riders for on-demand booking instructions.
pickup_message: Option<String>Optional Message for on-demand pickup instructions.
drop_off_message: Option<String>Optional Message for on-demand drop-off instructions.
phone_number: Option<String>Optional Phone number riders call to make the booking request.
info_url: Option<String>Optional URL providing additional booking info.
booking_url: Option<String>Optional URL to an online interface or app to make a booking request.
Implementations§
Source§impl GTFSBookingRule
impl GTFSBookingRule
Sourcepub fn get_booking_type(&self) -> GTFSBookingType
pub fn get_booking_type(&self) -> GTFSBookingType
Get the booking type
Trait Implementations§
Source§impl Clone for GTFSBookingRule
impl Clone for GTFSBookingRule
Source§fn clone(&self) -> GTFSBookingRule
fn clone(&self) -> GTFSBookingRule
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for GTFSBookingRule
impl Debug for GTFSBookingRule
Source§impl Default for GTFSBookingRule
impl Default for GTFSBookingRule
Source§fn default() -> GTFSBookingRule
fn default() -> GTFSBookingRule
Source§impl From<&Map<String, ValueType>> for GTFSBookingRule
Starting from a ref to an MValue, convert to a struct
impl From<&Map<String, ValueType>> for GTFSBookingRule
Starting from a ref to an MValue, convert to a struct
Source§impl From<&ValueType> for GTFSBookingRule
If this struct ref is nested into another struct, pull out the MValue and let
From handle
impl From<&ValueType> for GTFSBookingRule
If this struct ref is nested into another struct, pull out the MValue and let
From
Source§impl From<GTFSBookingRule> for MValue
Starting from a struct, convert to an MValue
impl From<GTFSBookingRule> for MValue
Starting from a struct, convert to an MValue
Source§fn from(value: GTFSBookingRule) -> MValue
fn from(value: GTFSBookingRule) -> MValue
Source§impl From<GTFSBookingRule> for ValueType
If this struct is nested into another struct, convert to a ValueType that’s nested
impl From<GTFSBookingRule> for ValueType
If this struct is nested into another struct, convert to a ValueType that’s nested
Source§fn from(value: GTFSBookingRule) -> ValueType
fn from(value: GTFSBookingRule) -> ValueType
Source§impl From<Map<String, ValueType>> for GTFSBookingRule
Starting from an MValue, convert to a struct
impl From<Map<String, ValueType>> for GTFSBookingRule
Starting from an MValue, convert to a struct
Source§impl From<ValueType> for GTFSBookingRule
If this struct is nested into another struct, pull out the MValue and let
From handle
impl From<ValueType> for GTFSBookingRule
If this struct is nested into another struct, pull out the MValue and let
From
Source§impl PartialEq for GTFSBookingRule
impl PartialEq for GTFSBookingRule
impl MValueCompatible for GTFSBookingRule
Finally implement the MValueCompatible trait
impl StructuralPartialEq for GTFSBookingRule
Auto Trait Implementations§
impl Freeze for GTFSBookingRule
impl RefUnwindSafe for GTFSBookingRule
impl Send for GTFSBookingRule
impl Sync for GTFSBookingRule
impl Unpin for GTFSBookingRule
impl UnwindSafe for GTFSBookingRule
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().