pub enum BaoEvent {
FetchRequestPaused {
request_id: String,
url: String,
method: String,
headers: Value,
post_data: Option<String>,
resource_type: String,
},
NetworkRequestWillBeSent {
request_id: String,
url: String,
method: String,
headers: Value,
request: Value,
timestamp: f64,
resource_type: String,
},
NetworkResponseReceived {
request_id: String,
url: String,
status: i32,
status_text: String,
headers: Value,
timestamp: f64,
resource_type: String,
},
NetworkLoadingFailed {
request_id: String,
resource_type: String,
error_text: String,
timestamp: f64,
},
DebuggerScriptParsed {
script_id: String,
url: String,
start_line: i32,
end_line: i32,
},
DebuggerPaused {
call_frames: Value,
reason: String,
hit_breakpoints: Value,
},
RuntimeExceptionThrown {
timestamp: f64,
text: String,
url: String,
line: i32,
column: i32,
stack_trace: Value,
},
PageLoadEventFired {
timestamp: f64,
},
PageFrameNavigated {
frame_id: String,
url: String,
loader_id: String,
},
SecurityCertificateError {
event_id: i32,
error_type: String,
url: String,
},
}Expand description
Typed representation of CDP events that originate from the browser engine (servo/bao_browser) and are forwarded to cdp-server via console messages.
The old protocol used 8 different __BAO_*__ string prefixes. This enum
replaces that with a single standardized transport format:
__BAO_EVT__CDP.MethodName\n{json}Variants§
FetchRequestPaused
Fields
NetworkRequestWillBeSent
Fields
NetworkResponseReceived
Fields
NetworkLoadingFailed
DebuggerScriptParsed
DebuggerPaused
RuntimeExceptionThrown
PageLoadEventFired
SecurityCertificateError
Implementations§
Source§impl BaoEvent
Parse a console text string into a ConsoleMessage.
impl BaoEvent
Parse a console text string into a ConsoleMessage.
Transport format for events:
__BAO_EVT__CDP.MethodName\n{json}- Lines without the
__BAO_EVT__prefix →ConsoleMessage::Log - Lines with unknown CDP method →
None - Malformed JSON → best-effort parse with defaults
- Missing newline → treat everything after the prefix as JSON
pub fn from_console_text(text: &str) -> Option<ConsoleMessage>
Trait Implementations§
impl StructuralPartialEq for BaoEvent
Auto Trait Implementations§
impl Freeze for BaoEvent
impl RefUnwindSafe for BaoEvent
impl Send for BaoEvent
impl Sync for BaoEvent
impl Unpin for BaoEvent
impl UnsafeUnpin for BaoEvent
impl UnwindSafe for BaoEvent
Blanket Implementations§
Source§impl<T> AsCtxPtr for Twhere
T: ?Sized,
impl<T> AsCtxPtr for Twhere
T: ?Sized,
Source§fn as_ctx_ptr(&self) -> *mut Selfwhere
Self: Sized,
fn as_ctx_ptr(&self) -> *mut Selfwhere
Self: Sized,
self’s address as *mut Self for deferred-task / scopeguard /
ref_guard ctx slots. The closures/trampolines deref it as shared
(&*p) — every method they reach is &self post-R-2, so no write
provenance is required; the *mut spelling is purely to match the
existing DerefOnDrop / HasAutoFlush / RefCount ABI.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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Filterable for T
impl<T> Filterable for T
Source§fn filterable(
self,
filter_name: &'static str,
) -> RequestFilterDataProvider<T, fn(DataRequest<'_>) -> bool>
fn filterable( self, filter_name: &'static str, ) -> RequestFilterDataProvider<T, fn(DataRequest<'_>) -> bool>
Creates a filterable data provider with the given name for debugging. 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 moreSource§impl<T> MaybeBoxed<Box<T>> for T
impl<T> MaybeBoxed<Box<T>> for T
Source§fn maybe_boxed(self) -> Box<T>
fn maybe_boxed(self) -> Box<T>
Convert
Source§impl<T> MaybeBoxed<T> for T
impl<T> MaybeBoxed<T> for T
Source§fn maybe_boxed(self) -> T
fn maybe_boxed(self) -> T
Convert