Skip to main content

Collector

Trait Collector 

Source
pub trait Collector: Send + Sync {
    // Required methods
    fn entity_name(&self) -> &str;
    fn collect_all(&self) -> Result<Vec<Record>, LinuxProviderError>;
}
Expand description

A collector gathers records from a Linux subsystem (e.g. /proc).

Required Methods§

Source

fn entity_name(&self) -> &str

The entity name this collector produces (e.g. “SystemInfo”, “Process”).

Source

fn collect_all(&self) -> Result<Vec<Record>, LinuxProviderError>

Collect all records from the underlying data source.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§