pub trait Moderator: Debug {
type Sync;
// Required methods
fn new() -> Self::Sync;
fn try_read(sync: &Self::Sync, duration: Duration) -> bool;
fn read_unlock(sync: &Self::Sync);
fn try_write(sync: &Self::Sync, duration: Duration) -> bool;
fn write_unlock(sync: &Self::Sync);
fn downgrade(sync: &Self::Sync);
fn try_upgrade(sync: &Self::Sync, duration: Duration) -> bool;
}Required Associated Types§
Required Methods§
fn new() -> Self::Sync
fn try_read(sync: &Self::Sync, duration: Duration) -> bool
fn read_unlock(sync: &Self::Sync)
fn try_write(sync: &Self::Sync, duration: Duration) -> bool
fn write_unlock(sync: &Self::Sync)
fn downgrade(sync: &Self::Sync)
fn try_upgrade(sync: &Self::Sync, duration: Duration) -> bool
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".