pub trait RailwayApiClient {
// Required methods
fn connect<'life0, 'life1, 'async_trait>(
&'life0 mut self,
url: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn fetch_by_area_name<'life0, 'life1, 'async_trait>(
&'life0 self,
area_name: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn fetch_by_bbox<'life0, 'life1, 'async_trait>(
&'life0 self,
bbox: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}
Expand description
A trait for implementing an Railway API client.
RailwayApiClient
is an asynchronous trait that provides a common interface
for fetching data by area name or bounding box.