pub struct DevToolsHub {
pub channel: SseChannel,
/* private fields */
}Expand description
Shared DevTools state installed on the app.
Fields§
§channel: SseChannelImplementations§
Source§impl DevToolsHub
impl DevToolsHub
pub fn new(request_cap: usize, log_cap: usize) -> Self
pub fn set_config_info(&self, plugins: Vec<String>, profile: String)
pub fn push_snapshot(&self, snap: RequestSnapshot)
pub fn push_log(&self, line: LogLine)
Sourcepub fn emit(&self, kind: impl Into<String>, payload: Value)
pub fn emit(&self, kind: impl Into<String>, payload: Value)
Emit a custom application/plugin event onto the DevTools SSE feed.
pub fn push_memory_sample(&self, rss_bytes: Option<u64>)
pub fn get(&self, id: &str) -> Option<RequestSnapshot>
pub fn list_meta(&self, limit: usize) -> Vec<RequestMeta>
pub fn recent_logs(&self, limit: usize) -> Vec<LogLine>
pub fn recent_custom(&self, limit: usize) -> Vec<CustomEvent>
pub fn recent_memory(&self, limit: usize) -> MemorySummary
pub fn config_json(&self) -> Value
Trait Implementations§
Source§impl Clone for DevToolsHub
impl Clone for DevToolsHub
Source§fn clone(&self) -> DevToolsHub
fn clone(&self) -> DevToolsHub
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for DevToolsHub
impl RefUnwindSafe for DevToolsHub
impl Send for DevToolsHub
impl Sync for DevToolsHub
impl Unpin for DevToolsHub
impl UnsafeUnpin for DevToolsHub
impl UnwindSafe for DevToolsHub
Blanket Implementations§
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