pub trait CsvRemote:
Send
+ Sync
+ Debug {
// Required method
fn fetch(&self, url: &str, max_bytes: u64) -> Result<Vec<u8>, RemoteFailure>;
}Expand description
The host-supplied fetcher behind a remote LOAD CSV source (ADR-0723).
Set through super::CsvPolicy::with_remote (the relate facade carries
it as OpenOptions::load_csv_remote). Without one, every http(s) source
is denied.
Required Methods§
Sourcefn fetch(&self, url: &str, max_bytes: u64) -> Result<Vec<u8>, RemoteFailure>
fn fetch(&self, url: &str, max_bytes: u64) -> Result<Vec<u8>, RemoteFailure>
GET url and return its body. The implementation must stop reading at
max_bytes + 1 bytes and report RemoteFailure::ExceededLimit
rather than truncate (the engine re-checks the length, so a buggy host
cannot lift the cap), must bound its own time, and decides its own
redirect policy.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".