Crate breadx_blocking

Crate breadx_blocking 

Source
Expand description

This crate provides the BlockingDisplay and [BlockingDisplayImmut] objects, which allow the user to convert a breadx::Display into a breadx::AsyncDisplay.

Occasionally, you have an object that implements breadx::Display that you need to implement breadx::AsyncDisplay. Although the *Display objects in breadx can be easily changed to implement breadx::AsyncDisplay by changing the Connection to an AsyncConnection, Display implementations outside of breadx may not share this guarantee.

BlockingDisplay<T> implements AsyncDisplay when T implements Display. BlockingDisplayImmut<T> implements AsyncDisplay and &AsyncDisplay when T implements &Display.

This is implemented on the blocking thread-pool when the tokio feature is not enabled, and is implemented via spawn_blocking when it is.

Structsยง

BlockingDisplay
An AsyncDisplay that sends operations for the Display onto a blocking thread-pool.