Struct amtrak_api::client::Client
source · pub struct Client { /* private fields */ }
Implementations§
source§impl Client
impl Client
pub fn new() -> Self
pub fn with_base_url(base_url: &str) -> Self
pub async fn trains(&self) -> Result<TrainResponse>
pub async fn train(&self, train_id: &str) -> Result<TrainResponse>
pub async fn stations(&self) -> Result<StationResponse>
pub async fn station(&self, station_id: &str) -> Result<StationResponse>
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl UnwindSafe for Client
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