pub enum GBFSReader {
V1(Box<GBFSReaderV1>),
V2(Box<GBFSReaderV2>),
V3(Box<GBFSReaderV3>),
}Expand description
§General Bikeshare Feed Specification (GBFS) Reader
§Description
The versions of GBFS reader classes this data could be (1, 2, or 3)
Implements the FeatureReader interface.
§Usage
If you want to know what datasets are available to you, you can get started with
parse_gtfs_systems_from_url.
If you want to build from a URL,
See build_gbfs_reader to build a GBFSReader or use GBFSReader::from_url
// TODO§Links
- https://github.com/MobilityData/gbfs
- https://github.com/MobilityData/gbfs-json-schema/tree/master/v3.0
Variants§
V1(Box<GBFSReaderV1>)
GBFS V1 Reader
V2(Box<GBFSReaderV2>)
GBFS V2 Reader
V3(Box<GBFSReaderV3>)
GBFS V3 Reader
Implementations§
Source§impl GBFSReader
impl GBFSReader
Sourcepub async fn from_url(url: &str, locale: Option<String>) -> GBFSReader
pub async fn from_url(url: &str, locale: Option<String>) -> GBFSReader
Build a GBFSReader from a URL. See build_gbfs_reader
Trait Implementations§
Source§impl Clone for GBFSReader
impl Clone for GBFSReader
Source§fn clone(&self) -> GBFSReader
fn clone(&self) -> GBFSReader
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for GBFSReader
impl Debug for GBFSReader
Source§impl<'de> Deserialize<'de> for GBFSReader
impl<'de> Deserialize<'de> for GBFSReader
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
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 FeatureReader<(), Map<String, ValueType>, Map<String, ValueType>> for GBFSReader
A feature reader trait with a callback-based approach
impl FeatureReader<(), Map<String, ValueType>, Map<String, ValueType>> for GBFSReader
A feature reader trait with a callback-based approach
Source§type FeatureIterator<'a> = GBFSIterator
type FeatureIterator<'a> = GBFSIterator
The Feature Reader should implement an iterator of some kind
Source§fn iter(&self) -> Self::FeatureIterator<'_>
fn iter(&self) -> Self::FeatureIterator<'_>
All readers have an iter function that returns a Iterator struct
Source§impl PartialEq for GBFSReader
impl PartialEq for GBFSReader
Source§impl Serialize for GBFSReader
impl Serialize for GBFSReader
impl StructuralPartialEq for GBFSReader
Auto Trait Implementations§
impl Freeze for GBFSReader
impl RefUnwindSafe for GBFSReader
impl Send for GBFSReader
impl Sync for GBFSReader
impl Unpin for GBFSReader
impl UnwindSafe for GBFSReader
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
Mutably borrows from an owned value. Read more
§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)
🔬This is a nightly-only experimental API. (
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>
Converts
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>
Converts
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 more