use rusty_v8 as v8;
use std::collections::{HashMap, BTreeMap};
use std::task::Context;
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum DebugEvent {
Break = 1,
Breakpoint = 5,
Exception = 2,
CompileError = 3,
CompileProgram = 4,
}
#[derive(Debug, Clone)]
pub struct DebugExecutionState {
_private: (),
}
impl DebugExecutionState {
pub fn frame_count(&self) -> usize {
0
}
pub fn get_break_location(&self) -> DebugBreakLocation {
DebugBreakLocation {
script_id: "unknown".to_string(),
line_number: 0,
column_number: 0,
}
}
}
#[derive(Debug, Clone)]
pub struct DebugBreakLocation {
pub script_id: String,
pub line_number: i32,
pub column_number: i32,
}
impl DebugBreakLocation {
pub fn script_id(&self) -> String {
self.script_id.clone()
}
pub fn line_number(&self) -> u32 {
self.line_number as u32
}
pub fn column_number(&self) -> u32 {
self.column_number as u32
}
}
pub struct Debug;
impl Debug {
pub fn set_console_error_message_callback<F>(_callback: Option<F>)
where
F: Fn(&v8::Local<'_, v8::Context>, &v8::Local<'_, v8::Value>, &v8::Local<'_, v8::Value>),
{
}
}
#[derive(Debug, Clone)]
pub struct GetOwnPropertyNamesOptions {
_private: (),
}
impl GetOwnPropertyNamesOptions {
pub fn default() -> Self {
Self { _private: () }
}
}