pub struct VortexOpenOptions<F: FileType> { /* private fields */ }
Expand description
Open options for a Vortex file reader.
Implementations§
Source§impl VortexOpenOptions<GenericVortexFile>
impl VortexOpenOptions<GenericVortexFile>
Sourcepub fn file() -> Self
pub fn file() -> Self
Open a file using the provided VortexReadAt
implementation.
Sourcepub fn with_initial_read_size(self, initial_read_size: u64) -> Self
pub fn with_initial_read_size(self, initial_read_size: u64) -> Self
Configure the initial read size for the Vortex file.
Sourcepub fn with_segment_cache(self, segment_cache: Arc<dyn SegmentCache>) -> Self
pub fn with_segment_cache(self, segment_cache: Arc<dyn SegmentCache>) -> Self
Configure a custom SegmentCache
.
Sourcepub fn without_segment_cache(self) -> Self
pub fn without_segment_cache(self) -> Self
Disable segment caching entirely.
pub fn with_io_concurrency(self, io_concurrency: usize) -> Self
Sourcepub async fn open_read_at<R: VortexReadAt + Send + Sync>(
self,
read: R,
) -> VortexResult<VortexFile>
pub async fn open_read_at<R: VortexReadAt + Send + Sync>( self, read: R, ) -> VortexResult<VortexFile>
Low-level API for opening any VortexReadAt
. Note that the user is responsible for
ensuring the VortexReadAt
implementation is compatible with the chosen I/O dispatcher.
Source§impl VortexOpenOptions<InMemoryFileType>
impl VortexOpenOptions<InMemoryFileType>
Sourcepub async fn open<B: Into<ByteBuffer>>(
self,
buffer: B,
) -> VortexResult<VortexFile>
pub async fn open<B: Into<ByteBuffer>>( self, buffer: B, ) -> VortexResult<VortexFile>
Open an in-memory file contained in the provided buffer.
Source§impl<F: FileType> VortexOpenOptions<F>
impl<F: FileType> VortexOpenOptions<F>
Sourcepub fn with_array_registry(self, registry: Arc<ArrayRegistry>) -> Self
pub fn with_array_registry(self, registry: Arc<ArrayRegistry>) -> Self
Configure a Vortex array registry.
Sourcepub fn with_layout_registry(self, registry: Arc<LayoutRegistry>) -> Self
pub fn with_layout_registry(self, registry: Arc<LayoutRegistry>) -> Self
Configure a Vortex array registry.
Sourcepub fn with_file_size(self, file_size: u64) -> Self
pub fn with_file_size(self, file_size: u64) -> Self
Configure a known file size.
This helps to prevent an I/O request to discover the size of the file. Of course, all bets are off if you pass an incorrect value.
Sourcepub fn with_dtype(self, dtype: DType) -> Self
pub fn with_dtype(self, dtype: DType) -> Self
Configure a known DType.
If this is provided, then the Vortex file may be opened with fewer I/O requests.
For Vortex files that do not contain a DType
, this is required.
Configure a known file layout.
If this is provided, then the Vortex file can be opened without performing any I/O.
Once open, the Footer
can be accessed via crate::VortexFile::footer
.
Sourcepub fn with_metrics(self, metrics: VortexMetrics) -> Self
pub fn with_metrics(self, metrics: VortexMetrics) -> Self
Configure a custom VortexMetrics
.
Auto Trait Implementations§
impl<F> Freeze for VortexOpenOptions<F>
impl<F> !RefUnwindSafe for VortexOpenOptions<F>
impl<F> Send for VortexOpenOptions<F>
impl<F> Sync for VortexOpenOptions<F>
impl<F> Unpin for VortexOpenOptions<F>
impl<F> !UnwindSafe for VortexOpenOptions<F>
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more