This reference describes unreleased code on main; no release documents it yet.

rlmesh::ext::CancelToken

structPreviewuse rlmesh::ext::CancelToken;[source]

Cancellation reported as KeyboardInterrupt. Every clone is the same token, so [cancel] on any copy fires it. One cancel() fails the call in flight on the token or, when none is, the next call made with it, at its start; the token then re-arms. Repeated cancel() before that call fails counts once.

struct CancelToken(/* private field */)

new

associated function[source]
fn new() -> Self

A token that has not fired (equal to default()).

cancel

method[source]
fn cancel(&self)

Fire every call currently using the token, or the next call when idle.

Trait implementations

  • impl Clone for CancelToken
  • impl Debug for CancelToken
  • impl Default for CancelToken