indexbus_platform_http/client.rs
1//! Client-side integration points.
2
3use crate::errors::Result;
4
5/// Placeholder for a typed HTTP client.
6///
7/// ## Feature requirements
8///
9/// This module is always available with the crate, but a real networked implementation is
10/// expected to live behind an integration feature (e.g. `reqwest`).
11///
12/// ## Contracts
13///
14/// The current [`HttpClient`] is intentionally a stub and does not perform I/O.
15/// It exists to reserve a stable place for an eventual client interface.
16#[derive(Clone, Debug, Default)]
17pub struct HttpClient;
18
19impl HttpClient {
20 /// Create a new client instance.
21 pub fn new() -> Self {
22 Self
23 }
24
25 /// Return whether the client is able to send requests.
26 ///
27 /// **Contract:** currently returns `Ok(true)` and performs no network validation.
28 pub fn is_ready(&self) -> Result<bool> {
29 Ok(true)
30 }
31}