Skip to main content

point_cost

Function point_cost 

Source
pub fn point_cost(
    document: &str,
    variables: &Variables,
) -> Result<u64, NodeCountError>
Expand description

The rate-limit points one call of document spends under variables, by GitHub’s published rules: worst_case_point_cost is this under largest_page_sizes, and a request this source sent is priced by it under the page sizes that request really bound — what GitHub charges the request, since it charges every connection at the page size asked for.

§Errors

Returns the calculation’s own NodeCountError when document does not parse, holds no single operation, or binds a page size variables does not name.