pub struct CollectionOptions { /* private fields */ }Expand description
Supported options for creating or opening a collection.
Storage layout, buffer, and segment knobs remain outside the public contract:
use a3s_vec::CollectionOptions;
let mut options = CollectionOptions::new().unwrap();
options.set_max_buffer_size(1024).unwrap();
options.set_segment_num(2).unwrap();Implementations§
Source§impl CollectionOptions
impl CollectionOptions
pub fn new() -> Result<Self>
pub fn set_read_only(&mut self, read_only: bool) -> Result<()>
pub fn read_only(&self) -> bool
pub fn set_durability(&mut self, value: Durability) -> Result<()>
pub fn durability(&self) -> Option<Durability>
Sourcepub fn set_io_backend(&mut self, value: IoBackend) -> Result<()>
pub fn set_io_backend(&mut self, value: IoBackend) -> Result<()>
Overrides the process-wide derived-sidecar I/O backend for this handle.
When absent, the backend configured through crate::ConfigBuilder is
captured when the collection is created or opened.
Sourcepub fn io_backend(&self) -> Option<IoBackend>
pub fn io_backend(&self) -> Option<IoBackend>
Returns this handle’s explicit I/O backend override, if any.
Sourcepub fn set_resource_limits(
&mut self,
value: CollectionResourceLimits,
) -> Result<()>
pub fn set_resource_limits( &mut self, value: CollectionResourceLimits, ) -> Result<()>
Applies a typed collection-local resource policy.
Sourcepub fn resource_limits(&self) -> CollectionResourceLimits
pub fn resource_limits(&self) -> CollectionResourceLimits
Returns the resource policy that this handle will capture.
Sourcepub fn set_storage_ceilings(&mut self, value: StorageCeilings) -> Result<()>
pub fn set_storage_ceilings(&mut self, value: StorageCeilings) -> Result<()>
Overrides process-wide persistence DoS ceilings for this handle.
When absent, the ceilings configured through crate::ConfigBuilder
(or product defaults) are captured at create/open. Values are never
inferred from host RAM or free disk.
Sourcepub fn storage_ceilings(&self) -> Option<StorageCeilings>
pub fn storage_ceilings(&self) -> Option<StorageCeilings>
Returns this handle’s explicit storage-ceiling override, if any.
Trait Implementations§
Source§impl Clone for CollectionOptions
impl Clone for CollectionOptions
Source§impl Debug for CollectionOptions
impl Debug for CollectionOptions
Auto Trait Implementations§
impl Freeze for CollectionOptions
impl RefUnwindSafe for CollectionOptions
impl Send for CollectionOptions
impl Sync for CollectionOptions
impl Unpin for CollectionOptions
impl UnsafeUnpin for CollectionOptions
impl UnwindSafe for CollectionOptions
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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