pub struct JsDbOptions {
pub dimensions: u32,
pub distance_metric: Option<JsDistanceMetric>,
pub storage_path: Option<String>,
pub hnsw_config: Option<JsHnswConfig>,
pub quantization: Option<JsQuantizationConfig>,
}Expand description
Database configuration options
Fields§
§dimensions: u32Vector dimensions
distance_metric: Option<JsDistanceMetric>Distance metric
storage_path: Option<String>Storage path
hnsw_config: Option<JsHnswConfig>HNSW configuration
quantization: Option<JsQuantizationConfig>Quantization configuration
Trait Implementations§
Source§impl Debug for JsDbOptions
impl Debug for JsDbOptions
Source§impl From<JsDbOptions> for DbOptions
impl From<JsDbOptions> for DbOptions
Source§fn from(options: JsDbOptions) -> Self
fn from(options: JsDbOptions) -> Self
Converts to this type from the input type.
Source§impl FromNapiValue for JsDbOptions
impl FromNapiValue for JsDbOptions
Source§unsafe fn from_napi_value(
env: napi_env,
napi_val: napi_value,
) -> Result<JsDbOptions>
unsafe fn from_napi_value( env: napi_env, napi_val: napi_value, ) -> Result<JsDbOptions>
Safety Read more
fn from_unknown(value: Unknown<'_>) -> Result<Self, Error>
Source§impl ToNapiValue for JsDbOptions
impl ToNapiValue for JsDbOptions
Source§unsafe fn to_napi_value(env: napi_env, val: JsDbOptions) -> Result<napi_value>
unsafe fn to_napi_value(env: napi_env, val: JsDbOptions) -> Result<napi_value>
Safety Read more
fn into_unknown(self, env: &Env) -> Result<Unknown<'_>, Error>
Source§impl TypeName for JsDbOptions
impl TypeName for JsDbOptions
Source§impl ValidateNapiValue for JsDbOptions
impl ValidateNapiValue for JsDbOptions
Source§unsafe fn validate(
env: *mut napi_env__,
napi_val: *mut napi_value__,
) -> Result<*mut napi_value__, Error>
unsafe fn validate( env: *mut napi_env__, napi_val: *mut napi_value__, ) -> Result<*mut napi_value__, Error>
Safety Read more
Auto Trait Implementations§
impl Freeze for JsDbOptions
impl RefUnwindSafe for JsDbOptions
impl Send for JsDbOptions
impl Sync for JsDbOptions
impl Unpin for JsDbOptions
impl UnwindSafe for JsDbOptions
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
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>
Converts
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>
Converts
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