Skip to main content

check_batch

Function check_batch 

Source
pub fn check_batch(
    urls: &[String],
    limits: &UrlSafetyLimits,
) -> Result<(), UrlSafetyError>
Expand description

Refuses a batch the port’s ceilings reject, before any network call: more than UrlSafetyLimits::max_batch URLs is UrlSafetyError::LimitExceeded, and any one invalid URL is UrlSafetyError::InvalidUrl. An empty batch is fine — there is nothing in it to refuse.

§Errors

The refusals named above; the batch size first, then the URLs in order.