pub struct Ferrix {
pub cpu: Processors,
pub ram: RAM,
pub swaps: Swaps,
pub dmi: DMITable,
pub drm: Video,
pub sys: Sys,
pub init: SystemdServices,
}Fields§
§cpu: Processors§ram: RAM§swaps: Swaps§dmi: DMITable§drm: Video§sys: Sys§init: SystemdServicesImplementations§
Source§impl Ferrix
impl Ferrix
pub async fn new() -> Result<Self>
pub async fn update(&mut self, conn: &Connection) -> Result<()>
pub async fn update1(&mut self) -> Result<()>
Sourcepub fn to_json(&self) -> Result<String>
pub fn to_json(&self) -> Result<String>
Performs serialization of structure data in JSON.
The returned value will be a SINGLE LINE of JSON data intended for reading by third-party software or for transmission over the network.
Sourcepub fn to_json_pretty(&self) -> Result<String>
pub fn to_json_pretty(&self) -> Result<String>
Performs serialization in “pretty” JSON
JSON will contain unnecessary newline transitions and spaces to visually separate the blocks. It is well suited for human reading and analysis.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Ferrix
impl RefUnwindSafe for Ferrix
impl Send for Ferrix
impl Sync for Ferrix
impl Unpin for Ferrix
impl UnwindSafe for Ferrix
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 more