pub trait Observable {
// Required method
fn change_token(&self) -> u32;
}Expand description
A type whose writes can be observed without interpreting the value.
change_token() returns a u32 whose only meaning is that two unequal
readings prove the signal was written between them. It is allowed to wrap,
and the supervisor never orders or interprets the numeric value.
For entries that feed a node’s heartbeat (observed beat), the token must
be counting: each write must advance it, because the heartbeat machinery
folds multiple beat entries into a single wrapping sum. Plain value-as-token
works for ordinary observation but is unsuitable for beats.
Required Methods§
Sourcefn change_token(&self) -> u32
fn change_token(&self) -> u32
Return a token that changes when the signal is written.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl Observable for Atomic<bool>
Available on target_has_atomic=8 only.
impl Observable for Atomic<bool>
target_has_atomic=8 only.fn change_token(&self) -> u32
Source§impl Observable for Atomic<i8>
Available on target_has_atomic=8 only.
impl Observable for Atomic<i8>
target_has_atomic=8 only.fn change_token(&self) -> u32
Source§impl Observable for Atomic<i16>
Available on target_has_atomic=16 only.
impl Observable for Atomic<i16>
target_has_atomic=16 only.fn change_token(&self) -> u32
Source§impl Observable for Atomic<i32>
Available on target_has_atomic=32 only.
impl Observable for Atomic<i32>
target_has_atomic=32 only.fn change_token(&self) -> u32
Source§impl Observable for Atomic<i64>
Available on target_has_atomic=64 only.
impl Observable for Atomic<i64>
target_has_atomic=64 only.fn change_token(&self) -> u32
Source§impl Observable for Atomic<isize>
Available on target_has_atomic=ptr only.
impl Observable for Atomic<isize>
target_has_atomic=ptr only.fn change_token(&self) -> u32
Source§impl Observable for Atomic<u8>
Available on target_has_atomic=8 only.
impl Observable for Atomic<u8>
target_has_atomic=8 only.fn change_token(&self) -> u32
Source§impl Observable for Atomic<u16>
Available on target_has_atomic=16 only.
impl Observable for Atomic<u16>
target_has_atomic=16 only.fn change_token(&self) -> u32
Source§impl Observable for Atomic<u32>
Available on target_has_atomic=32 only.
impl Observable for Atomic<u32>
target_has_atomic=32 only.fn change_token(&self) -> u32
Source§impl Observable for Atomic<u64>
Available on target_has_atomic=64 only.
impl Observable for Atomic<u64>
target_has_atomic=64 only.fn change_token(&self) -> u32
Source§impl Observable for Atomic<usize>
Available on target_has_atomic=ptr only.
impl Observable for Atomic<usize>
target_has_atomic=ptr only.fn change_token(&self) -> u32
Source§impl Observable for AtomicBool
impl Observable for AtomicBool
fn change_token(&self) -> u32
Source§impl Observable for AtomicI8
impl Observable for AtomicI8
fn change_token(&self) -> u32
Source§impl Observable for AtomicI16
impl Observable for AtomicI16
fn change_token(&self) -> u32
Source§impl Observable for AtomicI32
impl Observable for AtomicI32
fn change_token(&self) -> u32
Source§impl Observable for AtomicI64
impl Observable for AtomicI64
fn change_token(&self) -> u32
Source§impl Observable for AtomicIsize
impl Observable for AtomicIsize
fn change_token(&self) -> u32
Source§impl Observable for AtomicU8
impl Observable for AtomicU8
fn change_token(&self) -> u32
Source§impl Observable for AtomicU16
impl Observable for AtomicU16
fn change_token(&self) -> u32
Source§impl Observable for AtomicU32
impl Observable for AtomicU32
fn change_token(&self) -> u32
Source§impl Observable for AtomicU64
impl Observable for AtomicU64
fn change_token(&self) -> u32
Source§impl Observable for AtomicUsize
impl Observable for AtomicUsize
fn change_token(&self) -> u32
Implementors§
impl<T: Observable> Observable for Backed<T>
coupling-observe only.impl<T: Observable> Observable for Leased<T>
coupling-observe only.Polling a wrapped signal is polling what it wraps, so an observed entry
keeps working when a signal gains a lease count.
impl<T: Observable> Observable for Stamped<T>
coupling-observe only.impl<T> Observable for Counted<T>
impl<const N: usize> Observable for VetoGate<N>
coupling-observe only.