pub struct Health { /* private fields */ }Expand description
Health namespace for API health operations
Implementations§
Source§impl Health
impl Health
Sourcepub async fn check(&self) -> Result<HealthResponse, DataApiError>
pub async fn check(&self) -> Result<HealthResponse, DataApiError>
Check API health status
Sourcepub async fn ping(&self) -> Result<Duration, DataApiError>
pub async fn ping(&self) -> Result<Duration, DataApiError>
Measure the round-trip time (RTT) to the Polymarket Data API.
Makes a GET request to the API root and returns the latency.
§Example
use polyoxide_data::DataApi;
let client = DataApi::new()?;
let latency = client.health().ping().await?;
println!("API latency: {}ms", latency.as_millis());Trait Implementations§
Auto Trait Implementations§
impl Freeze for Health
impl !RefUnwindSafe for Health
impl Send for Health
impl Sync for Health
impl Unpin for Health
impl UnsafeUnpin for Health
impl !UnwindSafe for Health
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