pub struct DevTools { /* private fields */ }
Expand description
Main DevTools instance
Implementations§
Source§impl DevTools
impl DevTools
Sourcepub fn new(config: DevToolsConfig) -> Self
pub fn new(config: DevToolsConfig) -> Self
Create a new DevTools instance
Sourcepub async fn record_crdt_operation(
&self,
crdt_id: String,
operation: String,
replica_id: ReplicaId,
)
pub async fn record_crdt_operation( &self, crdt_id: String, operation: String, replica_id: ReplicaId, )
Record a CRDT operation
Sourcepub async fn record_sync_operation(
&self,
operation_id: String,
operation_type: String,
status: String,
duration_ms: Option<u64>,
)
pub async fn record_sync_operation( &self, operation_id: String, operation_type: String, status: String, duration_ms: Option<u64>, )
Record a sync operation
Sourcepub async fn record_transport_event(
&self,
transport_type: String,
event_type: String,
details: String,
)
pub async fn record_transport_event( &self, transport_type: String, event_type: String, details: String, )
Record a transport event
Sourcepub async fn record_performance_metric(
&self,
metric_name: String,
value: f64,
unit: String,
)
pub async fn record_performance_metric( &self, metric_name: String, value: f64, unit: String, )
Record a performance metric
Sourcepub async fn get_events(&self) -> Vec<DevToolsEvent>
pub async fn get_events(&self) -> Vec<DevToolsEvent>
Get all events
Sourcepub async fn get_crdt_inspections(&self) -> HashMap<String, CrdtInspection>
pub async fn get_crdt_inspections(&self) -> HashMap<String, CrdtInspection>
Get CRDT inspections
Sourcepub async fn get_sync_stats(&self) -> SyncStats
pub async fn get_sync_stats(&self) -> SyncStats
Get sync statistics
Sourcepub async fn get_transport_stats(&self) -> HashMap<String, TransportStats>
pub async fn get_transport_stats(&self) -> HashMap<String, TransportStats>
Get transport statistics
Sourcepub async fn get_performance_metrics(&self) -> PerformanceMetrics
pub async fn get_performance_metrics(&self) -> PerformanceMetrics
Get performance metrics
Sourcepub async fn clear_events(&self)
pub async fn clear_events(&self)
Clear all events
Sourcepub fn config(&self) -> &DevToolsConfig
pub fn config(&self) -> &DevToolsConfig
Get configuration
Sourcepub async fn get_events_by_type(&self, event_type: &str) -> Vec<DevToolsEvent>
pub async fn get_events_by_type(&self, event_type: &str) -> Vec<DevToolsEvent>
Get events filtered by type
Sourcepub async fn get_recent_events(&self, count: usize) -> Vec<DevToolsEvent>
pub async fn get_recent_events(&self, count: usize) -> Vec<DevToolsEvent>
Get recent events (last N events)
Sourcepub async fn get_event_counts(&self) -> HashMap<String, usize>
pub async fn get_event_counts(&self) -> HashMap<String, usize>
Get event count by type
Sourcepub async fn export_data(&self) -> Result<String, Error>
pub async fn export_data(&self) -> Result<String, Error>
Export all data as JSON
Auto Trait Implementations§
impl Freeze for DevTools
impl !RefUnwindSafe for DevTools
impl Send for DevTools
impl Sync for DevTools
impl Unpin for DevTools
impl !UnwindSafe for DevTools
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
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> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> SerializableKey for T
impl<T> SerializableKey for T
Source§impl<T> StorageAccess<T> for T
impl<T> StorageAccess<T> for T
Source§fn as_borrowed(&self) -> &T
fn as_borrowed(&self) -> &T
Borrows the value.
Source§fn into_taken(self) -> T
fn into_taken(self) -> T
Takes the value.