Skip to main content

Moderator

Trait Moderator 

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

Source

fn new() -> Self::Sync

Source

fn try_read(sync: &Self::Sync, duration: Duration) -> bool

Source

fn read_unlock(sync: &Self::Sync)

Source

fn try_write(sync: &Self::Sync, duration: Duration) -> bool

Source

fn write_unlock(sync: &Self::Sync)

Source

fn downgrade(sync: &Self::Sync)

Source

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".

Implementors§

Source§

impl Moderator for ArrivalOrdered

Source§

type Sync = ArrivalOrderedSync

Source§

impl Moderator for LegacyArrivalOrdered

Source§

type Sync = LegacyArrivalOrderedSync

Source§

impl Moderator for LegacyReadBiased

Source§

type Sync = LegacyReadBiasedSync

Source§

impl Moderator for LegacyWriteBiased

Source§

type Sync = LegacyWriteBiasedSync

Source§

impl Moderator for ReadBiased

Source§

type Sync = ReadBiasedSync

Source§

impl Moderator for Stochastic

Source§

type Sync = StochasticSync

Source§

impl Moderator for WriteBiased

Source§

type Sync = WriteBiasedSync