pub struct NodeInfoCollector { /* private fields */ }Expand description
Main collector for node information
Implementations§
Source§impl NodeInfoCollector
impl NodeInfoCollector
pub fn new() -> Self
Sourcepub fn create_current_node() -> Node
pub fn create_current_node() -> Node
Create a Node instance for the current machine Uses hardware UUID for node ID and collects hostname and local IP
Sourcepub fn collect_sysinfo(
&self,
node_id: Uuid,
) -> Result<NodeSysInfo, NodeInfoError>
pub fn collect_sysinfo( &self, node_id: Uuid, ) -> Result<NodeSysInfo, NodeInfoError>
Collect system information for the current node.
§Errors
Returns NodeInfoError::SysInfoCollectionFailed if system info collection fails.
Sourcepub fn collect_syscap(&self, node_id: Uuid) -> Result<NodeSysCap, NodeInfoError>
pub fn collect_syscap(&self, node_id: Uuid) -> Result<NodeSysCap, NodeInfoError>
Collect system capabilities for the current node.
§Errors
Returns NodeInfoError::SysCapCollectionFailed if capability collection fails.
Sourcepub fn collect_all(
&self,
node_id: Uuid,
) -> Result<(NodeSysInfo, NodeSysCap), NodeInfoError>
pub fn collect_all( &self, node_id: Uuid, ) -> Result<(NodeSysInfo, NodeSysCap), NodeInfoError>
Collect both sysinfo and syscap.
§Errors
Returns NodeInfoError::SysInfoCollectionFailed if system info collection fails.
Returns NodeInfoError::SysCapCollectionFailed if capability collection fails.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for NodeInfoCollector
impl RefUnwindSafe for NodeInfoCollector
impl Send for NodeInfoCollector
impl Sync for NodeInfoCollector
impl Unpin for NodeInfoCollector
impl UnsafeUnpin for NodeInfoCollector
impl UnwindSafe for NodeInfoCollector
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