pub(crate) fn get_external_references() -> Vec<v8::ExternalReference> {
vec![
v8::ExternalReference {
function: v8::MapFnTo::map_fn_to(streams_enqueue_chunk),
},
v8::ExternalReference {
function: v8::MapFnTo::map_fn_to(streams_close_stream),
},
v8::ExternalReference {
function: v8::MapFnTo::map_fn_to(streams_error_stream),
},
]
}
pub(crate) fn register_bindings(scope: &mut v8::PinScope, bindings: v8::Local<v8::Object>) {
let name = v8::String::new(scope, "streamsEnqueueChunk").unwrap();
let value = v8::Function::new(scope, streams_enqueue_chunk).unwrap();
bindings.set(scope, name.into(), value.into());
let name = v8::String::new(scope, "streamsCloseStream").unwrap();
let value = v8::Function::new(scope, streams_close_stream).unwrap();
bindings.set(scope, name.into(), value.into());
let name = v8::String::new(scope, "streamsErrorStream").unwrap();
let value = v8::Function::new(scope, streams_error_stream).unwrap();
bindings.set(scope, name.into(), value.into());
}
fn streams_enqueue_chunk(
_scope: &mut v8::PinScope,
_args: v8::FunctionCallbackArguments,
_rv: v8::ReturnValue,
) {
}
fn streams_close_stream(
_scope: &mut v8::PinScope,
_args: v8::FunctionCallbackArguments,
_rv: v8::ReturnValue,
) {
}
fn streams_error_stream(
_scope: &mut v8::PinScope,
_args: v8::FunctionCallbackArguments,
_rv: v8::ReturnValue,
) {
}