Skip to main content

HTTStorageConfigBuilder

Struct HTTStorageConfigBuilder 

Source
pub struct HTTStorageConfigBuilder { /* private fields */ }
Expand description

Builder for HTT storage configuration.

Implementations§

Source§

impl HTTStorageConfigBuilder

Source

pub fn new() -> Self

Create a new builder with defaults.

Source

pub fn dimension(self, dimension: usize) -> Self

Set the dimension.

Source

pub fn max_memory_nodes(self, max_memory_nodes: usize) -> Self

Set the maximum in-memory nodes.

Source

pub fn cache_size(self, cache_size: usize) -> Self

Set the cache size.

Source

pub fn storage_path(self, storage_path: Option<String>) -> Self

Set the storage path.

Source

pub fn flush_interval(self, flush_interval: u64) -> Self

Set the flush interval.

Source

pub fn optimize_on_shutdown(self, optimize_on_shutdown: bool) -> Self

Set optimize on shutdown.

Source

pub fn grid_resolution(self, grid_resolution: usize) -> Self

Set point location grid resolution (0 = use default of 64).

Source

pub fn tau(self, tau: FixedPoint) -> Self

Set the Sarkar embedding scale factor τ (zero = use default of 1.0).

Source

pub fn build(self) -> HTTStorageConfig

Build the configuration.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.