pub trait DatabasePingTrait {
// Required methods
fn get_ping_interval(&self) -> Duration;
fn get_last_ping_instant(&self) -> Instant;
fn update_last_ping_instant(&mut self);
// Provided method
fn check_timing_and_ping_database(
&mut self,
database_interface: &mut (impl Pingable + ?Sized),
) { ... }
}Required Methods§
Sourcefn get_ping_interval(&self) -> Duration
fn get_ping_interval(&self) -> Duration
Gets the interval at which the resource should be pinged.
Sourcefn get_last_ping_instant(&self) -> Instant
fn get_last_ping_instant(&self) -> Instant
Gets the timestamp of the last successful ping.
Sourcefn update_last_ping_instant(&mut self)
fn update_last_ping_instant(&mut self)
Updates the timestamp of the last successful ping.
Provided Methods§
Sourcefn check_timing_and_ping_database(
&mut self,
database_interface: &mut (impl Pingable + ?Sized),
)
fn check_timing_and_ping_database( &mut self, database_interface: &mut (impl Pingable + ?Sized), )
Pings the database.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.