pub type HttpRangeReader = RangeReader<HttpRangeFetcher>;Expand description
RangeReader over HttpRangeFetcher — the production remote-inspect
substrate.
Aliased Type§
pub struct HttpRangeReader { /* private fields */ }Implementations§
Source§impl HttpRangeReader
impl HttpRangeReader
Sourcepub async fn open(
repo_id: &str,
revision: Option<&str>,
filename: &str,
token: Option<&str>,
) -> Result<Self, FetchError>
pub async fn open( repo_id: &str, revision: Option<&str>, filename: &str, token: Option<&str>, ) -> Result<Self, FetchError>
Opens a range reader over filename in repo_id at revision
(default main).
Performs the probe eagerly, so failures (missing file, gated repo,
no Range support) surface here as typed errors rather than
mid-parse io::Errors.
Must be called from within a tokio runtime; the returned reader is
then handed to a blocking context (tokio::task::spawn_blocking),
where its Read / Seek impls drive async requests via the
captured runtime handle.
§Errors
Returns FetchError::Http if the probe fails, the repository or
file is inaccessible (including gated repos: returned status 401/403 errors, which the CLI upgrades into a gated-repo
diagnosis), or the server does not support Range requests.