Trait PettingTrait

Source
pub trait PettingTrait {
    // Required method
    fn pet(&mut self, filename: &str, watchdog_heartbeat: &str);
}
Expand description

Defines the interface for interacting with a system watchdog.

This trait provides a method for sending a “heartbeat” signal, typically by writing to a specific file, to inform a watchdog that the application is still alive and functioning.

Required Methods§

Source

fn pet(&mut self, filename: &str, watchdog_heartbeat: &str)

Sends a heartbeat message to the system watchdog.

This method’s implementation is responsible for performing the actual “petting” action, usually by writing a predefined string to a designated watchdog file.

§Arguments
  • filename - The path to the watchdog file or device.
  • watchdog_heartbeat - The specific string message representing the heartbeat.

Implementors§