pub struct Shape {
pub shape_id: Option<String>,
pub encoded_polyline: Option<String>,
}
Expand description
Describes the physical path that a vehicle takes when it’s not part of the (CSV) GTFS, such as for a detour. Shapes belong to Trips, and consist of a sequence of shape points. Tracing the points in order provides the path of the vehicle. Shapes do not need to intercept the location of Stops exactly, but all Stops on a trip should lie within a small distance of the shape for that trip, i.e. close to straight line segments connecting the shape points NOTE: This message is still experimental, and subject to change. It may be formally adopted in the future.
Fields§
§shape_id: Option<String>
Identifier of the shape. Must be different than any shape_id defined in the (CSV) GTFS. This field is required as per reference.md, but needs to be specified here optional because “Required is Forever” See https://developers.google.com/protocol-buffers/docs/proto#specifying_field_rules NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
encoded_polyline: Option<String>
Encoded polyline representation of the shape. This polyline must contain at least two points. For more information about encoded polylines, see https://developers.google.com/maps/documentation/utilities/polylinealgorithm This field is required as per reference.md, but needs to be specified here optional because “Required is Forever” See https://developers.google.com/protocol-buffers/docs/proto#specifying_field_rules NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
Implementations§
Trait Implementations§
source§impl Message for Shape
impl Message for Shape
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn decode<B>(buf: B) -> Result<Self, DecodeError>
fn decode<B>(buf: B) -> Result<Self, DecodeError>
source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
self
. Read moresource§fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
self
.