Skip to main content

Crate openraft_rt

Crate openraft_rt 

Source
Expand description

Async runtime abstraction traits for Openraft.

This crate provides the core traits for async runtime abstraction, allowing Openraft to work with different async runtimes (tokio, compio, monoio, etc.).

§Key Traits

§Features

Re-exports§

pub use instant::Instant;
pub use mpsc::Mpsc;
pub use mpsc::MpscReceiver;
pub use mpsc::MpscSender;
pub use mpsc::MpscWeakSender;
pub use mpsc::SendError;
pub use mpsc::TryRecvError;
pub use mutex::Mutex;
pub use mutex::OwnedGuard;
pub use oneshot::Oneshot;
pub use oneshot::OneshotSender;
pub use watch::RecvError;
pub use watch::Watch;
pub use watch::WatchReceiver;
pub use watch::WatchSender;

Modules§

instant
A trait for time instants.
mpsc
Bounded MPSC channel traits.
mutex
Async mutex trait.
oneshot
Oneshot channel traits.
testing
Suite for testing implementations of AsyncRuntime.
watch
Watch channel traits.

Traits§

AsyncRuntime
A trait defining interfaces with an asynchronous runtime.
OptionalSend
A trait that is empty if the single-threaded feature flag is enabled, otherwise it extends Send.
OptionalSync
A trait that is empty if the single-threaded feature flag is enabled, otherwise it extends Sync.

Type Aliases§

BoxAny
Type alias for a boxed value that is Send and can be any type.
BoxAsyncOnceMut
Type alias for a boxed async function that mutates its argument and is Send.
BoxFuture
Type alias for a boxed pinned future that is Send.
BoxIterator
Type alias for a boxed iterator that is Send.
BoxMaybeAsyncOnceMut
Type alias for a boxed function that optionally returns an async future.
BoxOnce
Type alias for a boxed function that takes an argument and is Send.
BoxStream
Type alias for a boxed pinned stream that is Send.