pub struct DevClient { /* private fields */ }Expand description
Thin newtype around Client for use against Bee in dev mode.
Cheap to clone.
Implementations§
Source§impl DevClient
impl DevClient
Sourcepub fn new(url: &str) -> Result<Self, Error>
pub fn new(url: &str) -> Result<Self, Error>
Construct a dev-mode client from a base URL. Same shape as
Client::new.
Sourcepub fn with_http_client(url: &str, http: Client) -> Result<Self, Error>
pub fn with_http_client(url: &str, http: Client) -> Result<Self, Error>
Construct a dev-mode client with a caller-provided HTTP client.
Sourcepub fn into_client(self) -> Client
pub fn into_client(self) -> Client
Convert into the wrapped Client.
Methods from Deref<Target = Client>§
Sourcepub async fn ping(&self) -> Result<Duration, Error>
pub async fn ping(&self) -> Result<Duration, Error>
GET /health round-trip latency. Useful for connection-status
indicators in dashboards and TUIs. Returns the elapsed
Duration regardless of body — the response is not parsed.
Sourcepub fn file(&self) -> FileApi
pub fn file(&self) -> FileApi
Sub-service: file / data / chunk / SOC / feed / collection uploads and downloads.
Sourcepub fn postage(&self) -> PostageApi
pub fn postage(&self) -> PostageApi
Sub-service: postage batch CRUD + stamp metadata. Stamp math
helpers live as free functions in crate::postage.
Sourcepub fn debug(&self) -> DebugApi
pub fn debug(&self) -> DebugApi
Sub-service: debug / operator endpoints (health, versions, peers, accounting, chequebook, stake).
Sourcepub fn api(&self) -> ApiService
pub fn api(&self) -> ApiService
Sub-service: generic /api/* endpoints (pin, tag, stewardship,
grantee, envelope).