1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
//! Helper functions for converting `v8::Local` values.

use raw::Local;

extern "C" {

    /// Casts the value provided to a `v8::Object` and mutates the `out` argument provided to refer
    /// to `v8::Local` handle of the converted value. Returns `false` if the conversion didn't
    /// succeed.
    #[link_name = "Neon_Convert_ToObject"]
    pub fn to_object(out: &mut Local, value: &Local) -> bool;

    /// Casts the value provided to a `v8::String` and mutates the `out` argument provided to refer
    /// to `v8::Local` handle of the converted value. Returns `false` if the conversion didn't
    /// succeed.
    #[link_name = "Neon_Convert_ToString"]
    pub fn to_string(out: &mut Local, value: Local) -> bool;

}