euv_ui/component/vconsole/hook/struct.rs
1use crate::*;
2
3/// A console abstraction providing web console API methods.
4///
5/// Methods are associated functions (not instance methods) that internally
6/// access the global Console signal, so callers use `Console::log(msg)`
7/// without needing to obtain or hold a Console instance.
8#[derive(Clone, Data, Debug, New)]
9pub struct Console;
10
11/// A single console entry containing a message and its log level.
12///
13/// Used to store entries in the global vConsole signal for both
14/// browser console output and vConsole panel rendering.
15#[derive(Clone, Data, Debug, New, PartialEq)]
16pub struct ConsoleEntry {
17 /// The log level determining the entry's category and display color.
18 #[get(type(copy))]
19 pub level: LogLevel,
20 /// The text content of the log message.
21 pub message: String,
22}