pub struct Transitous { /* private fields */ }Expand description
Transitous with the usage rules.
Implementations§
Source§impl Transitous
impl Transitous
Sourcepub fn new(config: &Config, product: &str) -> Result<Self, Error>
pub fn new(config: &Config, product: &str) -> Result<Self, Error>
A client for config, naming product (like transitous/1.2.0) in
the User-Agent.
Fails with Error::ContactMissing without a contact: no request is
possible then.
Sourcepub fn with_clock(self, clock: Clock) -> Self
pub fn with_clock(self, clock: Clock) -> Self
Uses clock for the current time.
Sourcepub fn usage_summary(&self) -> Result<UsageSummary, Error>
pub fn usage_summary(&self) -> Result<UsageSummary, Error>
The requests of the last 24 hours.
Sourcepub async fn find_stops(
&self,
query: &StopsQuery,
) -> Result<FindStopResult, Error>
pub async fn find_stops( &self, query: &StopsQuery, ) -> Result<FindStopResult, Error>
Stops by name.
Sourcepub async fn resolve_stop(
&self,
input: &str,
warnings: &mut Vec<String>,
) -> Result<String, Error>
pub async fn resolve_stop( &self, input: &str, warnings: &mut Vec<String>, ) -> Result<String, Error>
The stop ID for an ID or a name.
Sourcepub async fn departures(
&self,
query: &DeparturesQuery,
) -> Result<DeparturesResult, Error>
pub async fn departures( &self, query: &DeparturesQuery, ) -> Result<DeparturesResult, Error>
Departures or arrivals at a stop.
Sourcepub async fn trip(&self, query: &TripQuery) -> Result<TripResult, Error>
pub async fn trip(&self, query: &TripQuery) -> Result<TripResult, Error>
Connections between two places, each with its status.
An arrive-by search returns the connections that arrive last before
the time, so the earlier ones are there to switch to. If one page
has fewer than count, it asks once more for the page before.
Trait Implementations§
Source§impl Clone for Transitous
impl Clone for Transitous
Auto Trait Implementations§
impl !RefUnwindSafe for Transitous
impl !UnwindSafe for Transitous
impl Forget for Transitous
impl Freeze for Transitous
impl Move for Transitous
impl Send for Transitous
impl Sync for Transitous
impl Unpin for Transitous
impl UnsafeUnpin for Transitous
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more