pub struct Value<'s> {
pub v8_value: Local<'s, Value>,
}
Expand description
serde_v8::Value allows passing through v8::Value
s untouched
when de/serializing & allows mixing rust & v8 values in structs, tuples…
Fields§
§v8_value: Local<'s, Value>
Implementations§
source§impl<'s> Value<'s>
impl<'s> Value<'s>
sourcepub fn as_global<T>(&self, scope: &mut HandleScope<'s>) -> Global<T>
pub fn as_global<T>(&self, scope: &mut HandleScope<'s>) -> Global<T>
Converts this to a v8::Global
infallibly, if this v8
type can be converted infallibly
to v8::Global<T>
(eg: v8::Data
or v8::Value
).
sourcepub fn try_as_global<T>(
&self,
scope: &mut HandleScope<'s>
) -> Result<Global<T>, <Local<'s, T> as TryFrom<Local<'s, Value>>>::Error>
pub fn try_as_global<T>( &self, scope: &mut HandleScope<'s> ) -> Result<Global<T>, <Local<'s, T> as TryFrom<Local<'s, Value>>>::Error>
Converts this to a v8::Global
fallibly.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Value<'_>
impl<'de> Deserialize<'de> for Value<'_>
source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
source§impl<'s> TryFrom<Value<'s>> for Local<'s, Array>
impl<'s> TryFrom<Value<'s>> for Local<'s, Array>
Implements TryFrom
for the given v8
type. If the type is not compatible,
returns Err(v8::DataError)
.
source§impl<'s> TryFrom<Value<'s>> for Local<'s, ArrayBuffer>
impl<'s> TryFrom<Value<'s>> for Local<'s, ArrayBuffer>
Implements TryFrom
for the given v8
type. If the type is not compatible,
returns Err(v8::DataError)
.
source§impl<'s> TryFrom<Value<'s>> for Local<'s, ArrayBufferView>
impl<'s> TryFrom<Value<'s>> for Local<'s, ArrayBufferView>
Implements TryFrom
for the given v8
type. If the type is not compatible,
returns Err(v8::DataError)
.
source§impl<'s> TryFrom<Value<'s>> for Local<'s, BigInt>
impl<'s> TryFrom<Value<'s>> for Local<'s, BigInt>
Implements TryFrom
for the given v8
type. If the type is not compatible,
returns Err(v8::DataError)
.
source§impl<'s> TryFrom<Value<'s>> for Local<'s, BigInt64Array>
impl<'s> TryFrom<Value<'s>> for Local<'s, BigInt64Array>
Implements TryFrom
for the given v8
type. If the type is not compatible,
returns Err(v8::DataError)
.
source§impl<'s> TryFrom<Value<'s>> for Local<'s, BigIntObject>
impl<'s> TryFrom<Value<'s>> for Local<'s, BigIntObject>
Implements TryFrom
for the given v8
type. If the type is not compatible,
returns Err(v8::DataError)
.
source§impl<'s> TryFrom<Value<'s>> for Local<'s, BigUint64Array>
impl<'s> TryFrom<Value<'s>> for Local<'s, BigUint64Array>
Implements TryFrom
for the given v8
type. If the type is not compatible,
returns Err(v8::DataError)
.
source§impl<'s> TryFrom<Value<'s>> for Local<'s, Boolean>
impl<'s> TryFrom<Value<'s>> for Local<'s, Boolean>
Implements TryFrom
for the given v8
type. If the type is not compatible,
returns Err(v8::DataError)
.
source§impl<'s> TryFrom<Value<'s>> for Local<'s, BooleanObject>
impl<'s> TryFrom<Value<'s>> for Local<'s, BooleanObject>
Implements TryFrom
for the given v8
type. If the type is not compatible,
returns Err(v8::DataError)
.
source§impl<'s> TryFrom<Value<'s>> for Local<'s, DataView>
impl<'s> TryFrom<Value<'s>> for Local<'s, DataView>
Implements TryFrom
for the given v8
type. If the type is not compatible,
returns Err(v8::DataError)
.
source§impl<'s> TryFrom<Value<'s>> for Local<'s, Date>
impl<'s> TryFrom<Value<'s>> for Local<'s, Date>
Implements TryFrom
for the given v8
type. If the type is not compatible,
returns Err(v8::DataError)
.
source§impl<'s> TryFrom<Value<'s>> for Local<'s, External>
impl<'s> TryFrom<Value<'s>> for Local<'s, External>
Implements TryFrom
for the given v8
type. If the type is not compatible,
returns Err(v8::DataError)
.
source§impl<'s> TryFrom<Value<'s>> for Local<'s, Float32Array>
impl<'s> TryFrom<Value<'s>> for Local<'s, Float32Array>
Implements TryFrom
for the given v8
type. If the type is not compatible,
returns Err(v8::DataError)
.
source§impl<'s> TryFrom<Value<'s>> for Local<'s, Float64Array>
impl<'s> TryFrom<Value<'s>> for Local<'s, Float64Array>
Implements TryFrom
for the given v8
type. If the type is not compatible,
returns Err(v8::DataError)
.
source§impl<'s> TryFrom<Value<'s>> for Local<'s, Function>
impl<'s> TryFrom<Value<'s>> for Local<'s, Function>
Implements TryFrom
for the given v8
type. If the type is not compatible,
returns Err(v8::DataError)
.
source§impl<'s> TryFrom<Value<'s>> for Local<'s, Int16Array>
impl<'s> TryFrom<Value<'s>> for Local<'s, Int16Array>
Implements TryFrom
for the given v8
type. If the type is not compatible,
returns Err(v8::DataError)
.
source§impl<'s> TryFrom<Value<'s>> for Local<'s, Int32>
impl<'s> TryFrom<Value<'s>> for Local<'s, Int32>
Implements TryFrom
for the given v8
type. If the type is not compatible,
returns Err(v8::DataError)
.
source§impl<'s> TryFrom<Value<'s>> for Local<'s, Int32Array>
impl<'s> TryFrom<Value<'s>> for Local<'s, Int32Array>
Implements TryFrom
for the given v8
type. If the type is not compatible,
returns Err(v8::DataError)
.
source§impl<'s> TryFrom<Value<'s>> for Local<'s, Int8Array>
impl<'s> TryFrom<Value<'s>> for Local<'s, Int8Array>
Implements TryFrom
for the given v8
type. If the type is not compatible,
returns Err(v8::DataError)
.
source§impl<'s> TryFrom<Value<'s>> for Local<'s, Integer>
impl<'s> TryFrom<Value<'s>> for Local<'s, Integer>
Implements TryFrom
for the given v8
type. If the type is not compatible,
returns Err(v8::DataError)
.
source§impl<'s> TryFrom<Value<'s>> for Local<'s, Map>
impl<'s> TryFrom<Value<'s>> for Local<'s, Map>
Implements TryFrom
for the given v8
type. If the type is not compatible,
returns Err(v8::DataError)
.
source§impl<'s> TryFrom<Value<'s>> for Local<'s, Name>
impl<'s> TryFrom<Value<'s>> for Local<'s, Name>
Implements TryFrom
for the given v8
type. If the type is not compatible,
returns Err(v8::DataError)
.
source§impl<'s> TryFrom<Value<'s>> for Local<'s, Number>
impl<'s> TryFrom<Value<'s>> for Local<'s, Number>
Implements TryFrom
for the given v8
type. If the type is not compatible,
returns Err(v8::DataError)
.
source§impl<'s> TryFrom<Value<'s>> for Local<'s, NumberObject>
impl<'s> TryFrom<Value<'s>> for Local<'s, NumberObject>
Implements TryFrom
for the given v8
type. If the type is not compatible,
returns Err(v8::DataError)
.
source§impl<'s> TryFrom<Value<'s>> for Local<'s, Object>
impl<'s> TryFrom<Value<'s>> for Local<'s, Object>
Implements TryFrom
for the given v8
type. If the type is not compatible,
returns Err(v8::DataError)
.
source§impl<'s> TryFrom<Value<'s>> for Local<'s, Primitive>
impl<'s> TryFrom<Value<'s>> for Local<'s, Primitive>
Implements TryFrom
for the given v8
type. If the type is not compatible,
returns Err(v8::DataError)
.
source§impl<'s> TryFrom<Value<'s>> for Local<'s, Promise>
impl<'s> TryFrom<Value<'s>> for Local<'s, Promise>
Implements TryFrom
for the given v8
type. If the type is not compatible,
returns Err(v8::DataError)
.
source§impl<'s> TryFrom<Value<'s>> for Local<'s, PromiseResolver>
impl<'s> TryFrom<Value<'s>> for Local<'s, PromiseResolver>
Implements TryFrom
for the given v8
type. If the type is not compatible,
returns Err(v8::DataError)
.
source§impl<'s> TryFrom<Value<'s>> for Local<'s, Proxy>
impl<'s> TryFrom<Value<'s>> for Local<'s, Proxy>
Implements TryFrom
for the given v8
type. If the type is not compatible,
returns Err(v8::DataError)
.
source§impl<'s> TryFrom<Value<'s>> for Local<'s, RegExp>
impl<'s> TryFrom<Value<'s>> for Local<'s, RegExp>
Implements TryFrom
for the given v8
type. If the type is not compatible,
returns Err(v8::DataError)
.
source§impl<'s> TryFrom<Value<'s>> for Local<'s, Set>
impl<'s> TryFrom<Value<'s>> for Local<'s, Set>
Implements TryFrom
for the given v8
type. If the type is not compatible,
returns Err(v8::DataError)
.
Implements TryFrom
for the given v8
type. If the type is not compatible,
returns Err(v8::DataError)
.
source§impl<'s> TryFrom<Value<'s>> for Local<'s, String>
impl<'s> TryFrom<Value<'s>> for Local<'s, String>
Implements TryFrom
for the given v8
type. If the type is not compatible,
returns Err(v8::DataError)
.
source§impl<'s> TryFrom<Value<'s>> for Local<'s, StringObject>
impl<'s> TryFrom<Value<'s>> for Local<'s, StringObject>
Implements TryFrom
for the given v8
type. If the type is not compatible,
returns Err(v8::DataError)
.
source§impl<'s> TryFrom<Value<'s>> for Local<'s, Symbol>
impl<'s> TryFrom<Value<'s>> for Local<'s, Symbol>
Implements TryFrom
for the given v8
type. If the type is not compatible,
returns Err(v8::DataError)
.
source§impl<'s> TryFrom<Value<'s>> for Local<'s, SymbolObject>
impl<'s> TryFrom<Value<'s>> for Local<'s, SymbolObject>
Implements TryFrom
for the given v8
type. If the type is not compatible,
returns Err(v8::DataError)
.
source§impl<'s> TryFrom<Value<'s>> for Local<'s, TypedArray>
impl<'s> TryFrom<Value<'s>> for Local<'s, TypedArray>
Implements TryFrom
for the given v8
type. If the type is not compatible,
returns Err(v8::DataError)
.
source§impl<'s> TryFrom<Value<'s>> for Local<'s, Uint16Array>
impl<'s> TryFrom<Value<'s>> for Local<'s, Uint16Array>
Implements TryFrom
for the given v8
type. If the type is not compatible,
returns Err(v8::DataError)
.
source§impl<'s> TryFrom<Value<'s>> for Local<'s, Uint32>
impl<'s> TryFrom<Value<'s>> for Local<'s, Uint32>
Implements TryFrom
for the given v8
type. If the type is not compatible,
returns Err(v8::DataError)
.
source§impl<'s> TryFrom<Value<'s>> for Local<'s, Uint32Array>
impl<'s> TryFrom<Value<'s>> for Local<'s, Uint32Array>
Implements TryFrom
for the given v8
type. If the type is not compatible,
returns Err(v8::DataError)
.
source§impl<'s> TryFrom<Value<'s>> for Local<'s, Uint8Array>
impl<'s> TryFrom<Value<'s>> for Local<'s, Uint8Array>
Implements TryFrom
for the given v8
type. If the type is not compatible,
returns Err(v8::DataError)
.
source§impl<'s> TryFrom<Value<'s>> for Local<'s, Uint8ClampedArray>
impl<'s> TryFrom<Value<'s>> for Local<'s, Uint8ClampedArray>
Implements TryFrom
for the given v8
type. If the type is not compatible,
returns Err(v8::DataError)
.
source§impl<'s> TryFrom<Value<'s>> for Local<'s, WasmMemoryObject>
impl<'s> TryFrom<Value<'s>> for Local<'s, WasmMemoryObject>
Implements TryFrom
for the given v8
type. If the type is not compatible,
returns Err(v8::DataError)
.