pub struct JsInferenceResult { /* private fields */ }Expand description
Result of running inference
Implementations§
Source§impl JsInferenceResult
impl JsInferenceResult
pub fn into_reference( val: JsInferenceResult, env: Env, ) -> Result<Reference<JsInferenceResult>>
pub fn into_instance(self, env: Env) -> Result<ClassInstance<JsInferenceResult>>
Source§impl JsInferenceResult
impl JsInferenceResult
Sourcepub fn confidence(&self) -> f64
pub fn confidence(&self) -> f64
Get the confidence score
Sourcepub fn node_count(&self) -> u32
pub fn node_count(&self) -> u32
Get the number of GSS nodes
Sourcepub fn log_probability(&self) -> f64
pub fn log_probability(&self) -> f64
Get the log probability
pub fn to_string(&self) -> String
Trait Implementations§
Source§impl FromNapiMutRef for JsInferenceResult
impl FromNapiMutRef for JsInferenceResult
Source§unsafe fn from_napi_mut_ref(
env: napi_env,
napi_val: napi_value,
) -> Result<&'static mut Self>
unsafe fn from_napi_mut_ref( env: napi_env, napi_val: napi_value, ) -> Result<&'static mut Self>
Safety Read more
Source§impl FromNapiRef for JsInferenceResult
impl FromNapiRef for JsInferenceResult
Source§unsafe fn from_napi_ref(
env: napi_env,
napi_val: napi_value,
) -> Result<&'static Self>
unsafe fn from_napi_ref( env: napi_env, napi_val: napi_value, ) -> Result<&'static Self>
Safety Read more
Source§impl FromNapiValue for &JsInferenceResult
impl FromNapiValue for &JsInferenceResult
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 FromNapiValue for &mut JsInferenceResult
impl FromNapiValue for &mut JsInferenceResult
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 ObjectFinalize for JsInferenceResult
impl ObjectFinalize for JsInferenceResult
Source§impl ToNapiValue for JsInferenceResult
impl ToNapiValue for JsInferenceResult
Source§unsafe fn to_napi_value(
env: napi_env,
val: JsInferenceResult,
) -> Result<napi_value>
unsafe fn to_napi_value( env: napi_env, val: JsInferenceResult, ) -> Result<napi_value>
Safety Read more
Source§impl TypeName for &JsInferenceResult
impl TypeName for &JsInferenceResult
Source§impl TypeName for &mut JsInferenceResult
impl TypeName for &mut JsInferenceResult
Source§impl TypeName for JsInferenceResult
impl TypeName for JsInferenceResult
Source§impl ValidateNapiValue for &JsInferenceResult
impl ValidateNapiValue for &JsInferenceResult
Source§unsafe fn validate(env: napi_env, napi_val: napi_value) -> Result<napi_value>
unsafe fn validate(env: napi_env, napi_val: napi_value) -> Result<napi_value>
Safety Read more
Source§impl ValidateNapiValue for &mut JsInferenceResult
impl ValidateNapiValue for &mut JsInferenceResult
Source§unsafe fn validate(env: napi_env, napi_val: napi_value) -> Result<napi_value>
unsafe fn validate(env: napi_env, napi_val: napi_value) -> Result<napi_value>
Safety Read more
Auto Trait Implementations§
impl Freeze for JsInferenceResult
impl RefUnwindSafe for JsInferenceResult
impl Send for JsInferenceResult
impl Sync for JsInferenceResult
impl Unpin for JsInferenceResult
impl UnsafeUnpin for JsInferenceResult
impl UnwindSafe for JsInferenceResult
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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