pub struct SearchResult {
pub indices: Vec<u32>,
pub weights: Vec<f64>,
}Expand description
Result from differentiable search
Fields§
§indices: Vec<u32>Indices of top-k candidates
weights: Vec<f64>Soft weights for top-k candidates
Trait Implementations§
Source§impl FromNapiValue for SearchResult
impl FromNapiValue for SearchResult
Source§unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>
unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>
Safety Read more
fn from_unknown(value: JsUnknown) -> Result<Self, Error>
Source§impl ToNapiValue for SearchResult
impl ToNapiValue for SearchResult
Source§unsafe fn to_napi_value(env: napi_env, val: SearchResult) -> Result<napi_value>
unsafe fn to_napi_value(env: napi_env, val: SearchResult) -> Result<napi_value>
Safety Read more
Source§impl TypeName for SearchResult
impl TypeName for SearchResult
Source§impl ValidateNapiValue for SearchResult
impl ValidateNapiValue for SearchResult
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 SearchResult
impl RefUnwindSafe for SearchResult
impl Send for SearchResult
impl Sync for SearchResult
impl Unpin for SearchResult
impl UnwindSafe for SearchResult
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