dmfr

Struct Operator

Source
pub struct Operator {
    pub associated_feeds: Vec<OperatorAssociatedFeedsItem>,
    pub name: String,
    pub onestop_id: String,
    pub short_name: Option<String>,
    pub supersedes_ids: Vec<String>,
    pub tags: Map<String, Value>,
    pub website: Option<OperatorWebsite>,
}
Expand description

Operator

JSON schema
{
 "type": "object",
 "required": [
   "name",
   "onestop_id"
 ],
 "properties": {
   "associated_feeds": {
     "description": "Define associations between an operator and one or more feeds. If this operator is defined underneath a feed, it is not necessary to include a feed_onestop_id. In all cases, it is only necessary to specify a gtfs_agency_id when a feed includes more than one agency; Transitland will auto-detect the agency_id if the feed includes only one feed.",
     "type": "array",
     "items": {
       "type": "object",
       "properties": {
         "feed_onestop_id": {
           "description": "Feed id",
           "type": "string"
         },
         "gtfs_agency_id": {
           "description": "ID from the agency.txt",
           "type": "string"
         }
       }
     }
   },
   "name": {
     "description": "Full name of the operator. If there is an abbreviation or acronym for the operator, also define a short_name.",
     "type": "string"
   },
   "onestop_id": {
     "description": "The globally unique Onestop ID for this operator.",
     "type": "string"
   },
   "short_name": {
     "description": "Abbreviation, acronym, or secondary name of the operator.",
     "type": "string"
   },
   "supersedes_ids": {
     "description": "One or more Onestop IDs for old operator records that have since been merged into or taken over by this operator record.",
     "type": "array",
     "items": {
       "type": "string"
     }
   },
   "tags": {
     "description": "Extended information about the operator, including identifiers for this operator in other datasets.",
     "type": "object"
   },
   "website": {
     "description": "URL for the operator's public website.",
     "type": "string",
     "pattern": "^(http|https|ftp):\\/\\/[\\p{L}\\p{N}.,~#{}():&\\/%='?_/-]+$"
   }
 },
 "additionalProperties": false
}

Fields§

§associated_feeds: Vec<OperatorAssociatedFeedsItem>

Define associations between an operator and one or more feeds. If this operator is defined underneath a feed, it is not necessary to include a feed_onestop_id. In all cases, it is only necessary to specify a gtfs_agency_id when a feed includes more than one agency; Transitland will auto-detect the agency_id if the feed includes only one feed.

§name: String

Full name of the operator. If there is an abbreviation or acronym for the operator, also define a short_name.

§onestop_id: String

The globally unique Onestop ID for this operator.

§short_name: Option<String>

Abbreviation, acronym, or secondary name of the operator.

§supersedes_ids: Vec<String>

One or more Onestop IDs for old operator records that have since been merged into or taken over by this operator record.

§tags: Map<String, Value>

Extended information about the operator, including identifiers for this operator in other datasets.

§website: Option<OperatorWebsite>

URL for the operator’s public website.

Implementations§

Trait Implementations§

Source§

impl Clone for Operator

Source§

fn clone(&self) -> Operator

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Operator

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for Operator

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl From<&Operator> for Operator

Source§

fn from(value: &Operator) -> Self

Converts to this type from the input type.
Source§

impl From<Operator> for Operator

Source§

fn from(value: Operator) -> Self

Converts to this type from the input type.
Source§

impl Serialize for Operator

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl TryFrom<Operator> for Operator

Source§

type Error = ConversionError

The type returned in the event of a conversion error.
Source§

fn try_from(value: Operator) -> Result<Self, ConversionError>

Performs the conversion.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,