pub struct MachineInventory { /* private fields */ }Expand description
Inventory of available remote machines.
Implementations§
Source§impl MachineInventory
impl MachineInventory
Sourcepub fn deregister(&mut self, machine_id: &str) -> Option<Machine>
pub fn deregister(&mut self, machine_id: &str) -> Option<Machine>
Remove a machine from the inventory.
Sourcepub fn get_mut(&mut self, machine_id: &str) -> Option<&mut Machine>
pub fn get_mut(&mut self, machine_id: &str) -> Option<&mut Machine>
Get a mutable reference to a machine.
Sourcepub fn by_status(&self, status: &MachineStatus) -> Vec<&Machine>
pub fn by_status(&self, status: &MachineStatus) -> Vec<&Machine>
List machines matching a given status.
Sourcepub fn by_tool(&self, tool: &str) -> Vec<&Machine>
pub fn by_tool(&self, tool: &str) -> Vec<&Machine>
Find machines that have a specific tool installed.
Sourcepub fn heartbeat(&mut self, machine_id: &str) -> Result<()>
pub fn heartbeat(&mut self, machine_id: &str) -> Result<()>
Update the heartbeat timestamp for a machine.
Sourcepub fn mark_offline(&mut self, machine_id: &str) -> Result<()>
pub fn mark_offline(&mut self, machine_id: &str) -> Result<()>
Mark a machine as offline.
Trait Implementations§
Source§impl Debug for MachineInventory
impl Debug for MachineInventory
Auto Trait Implementations§
impl Freeze for MachineInventory
impl RefUnwindSafe for MachineInventory
impl Send for MachineInventory
impl Sync for MachineInventory
impl Unpin for MachineInventory
impl UnsafeUnpin for MachineInventory
impl UnwindSafe for MachineInventory
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