Seregon/StratoSDK

StratoSDK is a framework with a declarative approach similar to Flutter/React, written and designed entirely for Rust.

Rust/27.3 KB/No license
crates/strato-ui-core/src/async/native/mod.rs
1pub mod executor;
2 
3pub use async_io::{block_on, Timer};
4use futures::Future;
5 
6pub use futures_util::future::BoxFuture;
7 
8trait_set::trait_set! {
9 /// A trait representing a task which can be run in the background.
10 pub trait Spawnable = 'static + Future + Send;
11 /// A trait representing a stream which can be polled in the background.
12 pub trait Stream = 'static + futures::Stream + Send;
13 /// A trait representing a value which can be returned from a background
14 /// task.
15 pub trait SpawnableOutput = Send;
16 /// Bounds for async I/O streams passed to cross-platform networking code.
17 /// On native, streams must be `Send` for the multi-threaded tokio runtime.
18 pub trait TransportStream = Unpin + Send + 'static;
19}
20