Module lilos::util

source ·
Expand description

Utility code for use by applications.

Like atomic, this module exposes odds and ends that might be useful for applications. Unlike atomic, it’s not particularly focused on a single topic.

Structs§

  • Newtype to wrap the contents of a mutex or lock when you know, in the context of the current application, that it is okay to unlock this particular lock at any cancellation point.
  • Zero-sized marker type that can be included to ensure that a data structure is not automatically made Send (i.e. safe for transfer across threads).
  • Zero-sized marker type that can be included to ensure that a data structure is not automatically made Sync (i.e. safe for sharing across threads).
  • Future wrapper that adds a cancel action (result of FutureExt::on_cancel).

Traits§

  • Marker trait implementing the “Captures Trick” from Rust RFC 3498, ensuring that we do lifetime capturing right in the 2021 edition.
  • Extension trait for Future that adds common utility operations.