pub struct Rmv { /* private fields */ }Expand description
RMV with its rules.
Implementations§
Source§impl Rmv
impl Rmv
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 rmv/1.2.0) in the
User-Agent.
Fails with Error::AccessIdMissing without an access key: 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 with_retry_delay(self, delay: Duration) -> Self
pub fn with_retry_delay(self, delay: Duration) -> Self
Waits delay before the first repetition instead of
retry::DEFAULT_DELAY.
Sourcepub fn newer_version(&self) -> Option<&str>
pub fn newer_version(&self) -> Option<&str>
The version of the API, like 2.60, if one newer than
version::TESTED_VERSION has answered: its responses may hold data
that this version of rmv does not know. Callers warn about it once.
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,
) -> Result<(String, Option<String>), Error>
pub async fn resolve_stop( &self, input: &str, ) -> Result<(String, Option<String>), Error>
The stop for an ID or a name: its ID and, for a name, its 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.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Rmv
impl !UnwindSafe for Rmv
impl Forget for Rmv
impl Freeze for Rmvwhere
*const ArcInner<ClientRef> is !null: Freeze,
PhantomData<ArcInner<ClientRef>>: Freeze,
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
*const ArcInner<dyn Fn() -> Timestamp + Sync + Send> is !null: Freeze,
PhantomData<ArcInner<dyn Fn() -> Timestamp + Sync + Send>>: Freeze,
*const ArcInner<OnceLock<String>> is !null: Freeze,
PhantomData<ArcInner<OnceLock<String>>>: Freeze,
impl Move for Rmv
impl Send for Rmv
impl Sync for Rmv
impl Unpin for Rmv
impl UnsafeUnpin for Rmvwhere
*const ArcInner<ClientRef> is !null: UnsafeUnpin,
PhantomData<ArcInner<ClientRef>>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
*const ArcInner<dyn Fn() -> Timestamp + Sync + Send> is !null: UnsafeUnpin,
PhantomData<ArcInner<dyn Fn() -> Timestamp + Sync + Send>>: UnsafeUnpin,
*const ArcInner<OnceLock<String>> is !null: UnsafeUnpin,
PhantomData<ArcInner<OnceLock<String>>>: UnsafeUnpin,
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