pub struct CsvPolicy { /* private fields */ }Expand description
Validated, immutable source capability for LOAD CSV: the local-file root
(ADR-0081) and, independently, the host’s remote fetcher (ADR-0723).
Implementations§
Source§impl CsvPolicy
impl CsvPolicy
Sourcepub fn new(root: Option<PathBuf>, max_bytes: Option<u64>) -> Result<Self>
pub fn new(root: Option<PathBuf>, max_bytes: Option<u64>) -> Result<Self>
Validate the byte limit and canonicalize an existing CSV directory. A missing root denies local files, even when a limit is configured.
Sourcepub fn with_remote(self, remote: Arc<dyn CsvRemote>) -> Self
pub fn with_remote(self, remote: Arc<dyn CsvRemote>) -> Self
Allow http(s) LOAD CSV sources, read through the host’s remote
fetcher under the same byte limit as a local file (ADR-0723). Without
it every http(s) source is denied. This does not enable local files,
and a root does not enable remote sources.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for CsvPolicy
impl !UnwindSafe for CsvPolicy
impl Forget for CsvPolicy
impl Freeze for CsvPolicy
impl Move for CsvPolicy
impl Send for CsvPolicy
impl Sync for CsvPolicy
impl Unpin for CsvPolicy
impl UnsafeUnpin for CsvPolicywhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
*const ArcInner<dyn CsvRemote> is !null: UnsafeUnpin,
PhantomData<ArcInner<dyn CsvRemote>>: UnsafeUnpin,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more