pub struct VortexOpenOptions { /* private fields */ }
Expand description
Open options for a Vortex file reader.
Implementations§
Source§impl VortexOpenOptions
impl VortexOpenOptions
pub fn new(ctx: ContextRef) -> Self
Sourcepub fn with_layouts(self, layout_ctx: LayoutContextRef) -> Self
pub fn with_layouts(self, layout_ctx: LayoutContextRef) -> Self
Configure a layout context.
Sourcepub fn with_file_layout(self, file_layout: FileLayout) -> Self
pub fn with_file_layout(self, file_layout: FileLayout) -> Self
Configure a known file layout.
If this is provided, then the Vortex file can be opened without performing any I/O.
Once open, the FileLayout
can be accessed via VortexFile::file_layout
.
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_initial_read_size(
self,
initial_read_size: u64,
) -> VortexResult<Self>
pub fn with_initial_read_size( self, initial_read_size: u64, ) -> VortexResult<Self>
Configure the initial read size for the Vortex file.
Sourcepub fn with_split_by(self, split_by: SplitBy) -> Self
pub fn with_split_by(self, split_by: SplitBy) -> Self
Configure how to split the file into batches for reading.
Defaults to SplitBy::Layout
.
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.
Sourcepub fn with_execution_mode(self, execution_mode: ExecutionMode) -> Self
pub fn with_execution_mode(self, execution_mode: ExecutionMode) -> Self
Configure the execution mode
Sourcepub fn with_io_concurrency(self, io_concurrency: usize) -> Self
pub fn with_io_concurrency(self, io_concurrency: usize) -> Self
Configure the number of concurrent I/O requests.
Sourcepub fn with_exec_concurrency(self, exec_concurrency: usize) -> Self
pub fn with_exec_concurrency(self, exec_concurrency: usize) -> Self
Override the default split-by concurrency.
It is recommended to use more split-by concurrency than I/O concurrency to ensure there are always I/O operations enqueued.
Source§impl VortexOpenOptions
impl VortexOpenOptions
Sourcepub async fn open<R: VortexReadAt>(
self,
read: R,
) -> VortexResult<VortexFile<FileIoDriver<R>>>
pub async fn open<R: VortexReadAt>( self, read: R, ) -> VortexResult<VortexFile<FileIoDriver<R>>>
Open the Vortex file using asynchronous IO.
Auto Trait Implementations§
impl !Freeze for VortexOpenOptions
impl !RefUnwindSafe for VortexOpenOptions
impl Send for VortexOpenOptions
impl Sync for VortexOpenOptions
impl Unpin for VortexOpenOptions
impl !UnwindSafe for VortexOpenOptions
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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> 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 moreSource§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out
indicating that a T
is niched.