Crate noosphere_common

source ·
Expand description

Common, generic utilities that are shared across other Noosphere packages.

Modules

  • Utility wrapper around tokio::sync::mpsc channels, enabling multiple producers to send messages to a single subscriber, with each message able to be responded to by the subscriber.

Structs

  • A helper for observing when [Stream] throughput appears to have stalled
  • An aggregator of async work that can be used to observe the moment when all the aggregated work is completed. It is similar to tokio’s JoinSet, but is relatively constrained and also works on wasm32-unknown-unknown. Unlike JoinSet, the results can not be observed individually.
  • NOTE: This type was adapted from https://github.com/Nullus157/async-compression/blob/main/src/unshared.rs Original implementation licensed MIT/Apache 2
  • Wrapper that implements [Stream] for any Unshared that happens to wrap an appropriately bounded [Stream]. This is useful for making a !Sync stream into a Sync one in cases where we know it will not be shared by concurrent actors.

Traits

Functions

  • Spawn a future by scheduling it with the local executor. The returned future will be pending until the spawned future completes.