pub struct JsSemanticValue { /* private fields */ }Expand description
Computed semantic value (output of NSR inference)
Implementations§
Source§impl JsSemanticValue
impl JsSemanticValue
pub fn into_reference( val: JsSemanticValue, env: Env, ) -> Result<Reference<JsSemanticValue>>
pub fn into_instance(self, env: Env) -> Result<ClassInstance<JsSemanticValue>>
Source§impl JsSemanticValue
impl JsSemanticValue
Sourcepub fn list(items: Vec<&JsSemanticValue>) -> Self
pub fn list(items: Vec<&JsSemanticValue>) -> Self
Create a list of values
Sourcepub fn as_integer(&self) -> Option<i64>
pub fn as_integer(&self) -> Option<i64>
Get integer value if this is an integer
Sourcepub fn as_actions(&self) -> Option<Vec<String>>
pub fn as_actions(&self) -> Option<Vec<String>>
Get action sequence if this is an action sequence
pub fn to_string(&self) -> String
Trait Implementations§
Source§impl FromNapiMutRef for JsSemanticValue
impl FromNapiMutRef for JsSemanticValue
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 JsSemanticValue
impl FromNapiRef for JsSemanticValue
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 &JsSemanticValue
impl FromNapiValue for &JsSemanticValue
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 JsSemanticValue
impl FromNapiValue for &mut JsSemanticValue
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 JsSemanticValue
impl ObjectFinalize for JsSemanticValue
Source§impl ToNapiValue for JsSemanticValue
impl ToNapiValue for JsSemanticValue
Source§unsafe fn to_napi_value(
env: napi_env,
val: JsSemanticValue,
) -> Result<napi_value>
unsafe fn to_napi_value( env: napi_env, val: JsSemanticValue, ) -> Result<napi_value>
Safety Read more
Source§impl TypeName for &JsSemanticValue
impl TypeName for &JsSemanticValue
Source§impl TypeName for &mut JsSemanticValue
impl TypeName for &mut JsSemanticValue
Source§impl TypeName for JsSemanticValue
impl TypeName for JsSemanticValue
Source§impl ValidateNapiValue for &JsSemanticValue
impl ValidateNapiValue for &JsSemanticValue
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 JsSemanticValue
impl ValidateNapiValue for &mut JsSemanticValue
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 JsSemanticValue
impl RefUnwindSafe for JsSemanticValue
impl Send for JsSemanticValue
impl Sync for JsSemanticValue
impl Unpin for JsSemanticValue
impl UnsafeUnpin for JsSemanticValue
impl UnwindSafe for JsSemanticValue
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