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§
Sourcefn entity_name(&self) -> &str
fn entity_name(&self) -> &str
The entity name this collector produces (e.g. “SystemInfo”, “Process”).
Sourcefn collect_all(&self) -> Result<Vec<Record>, LinuxProviderError>
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".