pub struct MemoryResult {
pub node: Option<String>,
pub mem_total: u64,
pub mem_free: u64,
pub mem_available: u64,
pub buffers: u64,
pub cached: u64,
pub swap_total: u64,
pub swap_free: u64,
}Expand description
Memory information for a node.
Fields§
§node: Option<String>Node that returned this result.
mem_total: u64Total memory in bytes.
mem_free: u64Free memory in bytes.
mem_available: u64Available memory in bytes.
buffers: u64Buffer memory in bytes.
cached: u64Cached memory in bytes.
swap_total: u64Swap total in bytes.
swap_free: u64Swap free in bytes.
Implementations§
Source§impl MemoryResult
impl MemoryResult
Sourcepub fn usage_percent(&self) -> f64
pub fn usage_percent(&self) -> f64
Get memory usage percentage.
Trait Implementations§
Source§impl Clone for MemoryResult
impl Clone for MemoryResult
Source§fn clone(&self) -> MemoryResult
fn clone(&self) -> MemoryResult
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MemoryResult
impl Debug for MemoryResult
Source§impl From<Memory> for MemoryResult
impl From<Memory> for MemoryResult
Source§fn from(proto: ProtoMemory) -> Self
fn from(proto: ProtoMemory) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for MemoryResult
impl RefUnwindSafe for MemoryResult
impl Send for MemoryResult
impl Sync for MemoryResult
impl Unpin for MemoryResult
impl UnwindSafe for MemoryResult
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request