Skip to main content
This is unreleased documentation for Yew Next version.
For up-to-date documentation, see the latest version on docs.rs.

yew_agent/
lib.rs

1#![doc = include_str!("../README.md")]
2#![deny(
3    clippy::all,
4    missing_docs,
5    missing_debug_implementations,
6    bare_trait_objects,
7    anonymous_parameters,
8    elided_lifetimes_in_paths
9)]
10
11extern crate self as yew_agent;
12
13pub mod oneshot;
14pub mod reactor;
15pub mod worker;
16
17#[doc(inline)]
18pub use gloo_worker::{Bincode, Codec, Registrable, Spawnable};
19
20mod reach;
21pub mod scope_ext;
22
23pub use reach::Reach;
24
25mod utils;
26
27#[doc(hidden)]
28pub mod __vendored {
29    pub use futures;
30}
31
32pub mod prelude {
33    //! Prelude module to be imported when working with `yew-agent`.
34    //!
35    //! This module re-exports the frequently used types from the crate.
36    pub use crate::oneshot::{UseOneshotRunnerHandle, oneshot, use_oneshot_runner};
37    pub use crate::reach::Reach;
38    pub use crate::reactor::{
39        ReactorEvent, ReactorScope, UseReactorBridgeHandle, UseReactorSubscriptionHandle, reactor,
40        use_reactor_bridge, use_reactor_subscription,
41    };
42    pub use crate::scope_ext::{AgentScopeExt, ReactorBridgeHandle, WorkerBridgeHandle};
43    pub use crate::worker::{
44        UseWorkerBridgeHandle, UseWorkerSubscriptionHandle, WorkerScope, use_worker_bridge,
45        use_worker_subscription,
46    };
47    pub use crate::{Registrable, Spawnable};
48}