Skip to main content

DefaultEndpointObserver

Trait DefaultEndpointObserver 

Source
pub trait DefaultEndpointObserver:
    Sized
    + Send
    + Sync {
    // Required methods
    fn acquire() -> Self;
    fn latest_endpoint_id(&self) -> Option<String>;
    fn changed_from(&self, expected_id: Option<&str>) -> Option<String>;
}
Expand description

Event-driven OS default endpoint observer, independent of reads.

Required Methods§

Source

fn acquire() -> Self

Source

fn latest_endpoint_id(&self) -> Option<String>

Source

fn changed_from(&self, expected_id: Option<&str>) -> Option<String>

Allocation-free check returning Some(new_id) only when the live OS default endpoint differs from expected_id (0 heap allocations on steady-state Follow polls).

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§