Trait DatabasePingTrait

Source
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§

Source

fn get_ping_interval(&self) -> Duration

Gets the interval at which the resource should be pinged.

Source

fn get_last_ping_instant(&self) -> Instant

Gets the timestamp of the last successful ping.

Source

fn update_last_ping_instant(&mut self)

Updates the timestamp of the last successful ping.

Provided Methods§

Source

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.

Implementors§