pub struct DevToolsManager { /* private fields */ }Expand description
DevTools manager
Implementations§
Source§impl DevToolsManager
impl DevToolsManager
Sourcepub fn new(config: DevToolsConfig) -> Self
pub fn new(config: DevToolsConfig) -> Self
Create a new DevTools manager
Sourcepub fn is_enabled(&self) -> bool
pub fn is_enabled(&self) -> bool
Check if DevTools is enabled
Sourcepub fn start_server(
&mut self,
address: String,
) -> Result<DevToolsServer, String>
pub fn start_server( &mut self, address: String, ) -> Result<DevToolsServer, String>
Start the DevTools server
Sourcepub fn record_query_start(&self, key: &QueryKey)
pub fn record_query_start(&self, key: &QueryKey)
Record a query execution start
Sourcepub fn record_query_complete(
&self,
key: &QueryKey,
success: bool,
duration: Duration,
)
pub fn record_query_complete( &self, key: &QueryKey, success: bool, duration: Duration, )
Record a query execution completion
Sourcepub fn record_query_success(&self, key: &QueryKey, duration: Duration)
pub fn record_query_success(&self, key: &QueryKey, duration: Duration)
Record a successful query execution (convenience method)
Sourcepub fn record_query_error(&self, key: &QueryKey, error: &QueryError)
pub fn record_query_error(&self, key: &QueryKey, error: &QueryError)
Record a query error
Sourcepub fn record_network_request(&self, _key: &QueryKey, request: NetworkRequest)
pub fn record_network_request(&self, _key: &QueryKey, request: NetworkRequest)
Record a network request
Sourcepub fn record_cache_operation(
&self,
operation: CacheOperation,
_key: &QueryKey,
_data: Option<&impl Serialize>,
)
pub fn record_cache_operation( &self, operation: CacheOperation, _key: &QueryKey, _data: Option<&impl Serialize>, )
Record a cache operation
Sourcepub fn record_optimistic_update(&self, key: &QueryKey, update_id: &str)
pub fn record_optimistic_update(&self, key: &QueryKey, update_id: &str)
Record an optimistic update
Sourcepub fn record_optimistic_confirm(&self, key: &QueryKey, update_id: &str)
pub fn record_optimistic_confirm(&self, key: &QueryKey, update_id: &str)
Record an optimistic update confirmation
Sourcepub fn record_optimistic_rollback(&self, key: &QueryKey, update_id: &str)
pub fn record_optimistic_rollback(&self, key: &QueryKey, update_id: &str)
Record an optimistic update rollback
Sourcepub fn record_persistence_operation(
&self,
operation: &str,
key: Option<&QueryKey>,
)
pub fn record_persistence_operation( &self, operation: &str, key: Option<&QueryKey>, )
Record a persistence operation
Sourcepub fn get_query_metrics(&self, _key: &QueryKey) -> Option<QueryMetrics>
pub fn get_query_metrics(&self, _key: &QueryKey) -> Option<QueryMetrics>
Get query metrics
Sourcepub fn get_network_history(&self) -> Vec<NetworkRequest>
pub fn get_network_history(&self) -> Vec<NetworkRequest>
Get network request history
Sourcepub fn get_cache_history(&self) -> Vec<CacheOperation>
pub fn get_cache_history(&self) -> Vec<CacheOperation>
Get cache operation history
Sourcepub fn get_event_history(&self) -> Vec<DevToolsEvent>
pub fn get_event_history(&self) -> Vec<DevToolsEvent>
Get event history
Sourcepub fn get_active_queries(&self) -> Vec<ActiveQuery>
pub fn get_active_queries(&self) -> Vec<ActiveQuery>
Get active queries
Sourcepub fn get_cache_stats(&self, client: &QueryClient) -> CacheStats
pub fn get_cache_stats(&self, client: &QueryClient) -> CacheStats
Get cache statistics
Sourcepub fn get_cache_entries(
&self,
client: &QueryClient,
) -> Vec<(QueryKey, CacheEntry)>
pub fn get_cache_entries( &self, client: &QueryClient, ) -> Vec<(QueryKey, CacheEntry)>
Get cache entries
Sourcepub fn get_optimistic_stats(
&self,
manager: &OptimisticManager<String>,
) -> OptimisticStats
pub fn get_optimistic_stats( &self, manager: &OptimisticManager<String>, ) -> OptimisticStats
Get optimistic update statistics
Sourcepub fn get_persistence_stats(
&self,
manager: &PersistenceManager,
) -> HashMap<String, usize>
pub fn get_persistence_stats( &self, manager: &PersistenceManager, ) -> HashMap<String, usize>
Get persistence statistics
Sourcepub fn clear_history(&self)
pub fn clear_history(&self)
Clear all history
Sourcepub fn export_data(&self) -> DevToolsExport
pub fn export_data(&self) -> DevToolsExport
Export data for external tools
Sourcepub fn get_recent_events(&self, count: usize) -> Vec<DevToolsEvent>
pub fn get_recent_events(&self, count: usize) -> Vec<DevToolsEvent>
Get recent events (last N events)
Sourcepub fn start_monitoring(&mut self)
pub fn start_monitoring(&mut self)
Start monitoring (placeholder for real-time monitoring)
Sourcepub fn stop_monitoring(&mut self)
pub fn stop_monitoring(&mut self)
Stop monitoring
Sourcepub fn is_monitoring(&self) -> bool
pub fn is_monitoring(&self) -> bool
Check if monitoring is active
Sourcepub fn get_performance_stats(&self) -> PerformanceStats
pub fn get_performance_stats(&self) -> PerformanceStats
Get performance statistics
Sourcepub fn get_error_stats(&self) -> ErrorStats
pub fn get_error_stats(&self) -> ErrorStats
Get error statistics
Sourcepub fn import_data(&self, data: DevToolsExport)
pub fn import_data(&self, data: DevToolsExport)
Import data from external tools
Auto Trait Implementations§
impl Freeze for DevToolsManager
impl !RefUnwindSafe for DevToolsManager
impl Send for DevToolsManager
impl Sync for DevToolsManager
impl Unpin for DevToolsManager
impl !UnwindSafe for DevToolsManager
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
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>
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>
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 more