Skip to main content

fetch_usage

Function fetch_usage 

Source
pub fn fetch_usage(
    transport: &dyn UsageTransport,
    base_url: &str,
    creds: &Credentials,
    timeout: Duration,
) -> Result<UsageApiResponse, UsageError>
Expand description

Fetch usage data for the given credentials. Maps transport errors and HTTP status codes onto the UsageError taxonomy per docs/specs/rate-limit-segments.md §Error message table.