pub trait InterfaceHandle:
Clone
+ Send
+ Sync
+ 'static {
// Required methods
fn get(&self) -> Ipv4Addr;
fn set(&self, addr: Ipv4Addr);
}Expand description
Shared handle to the local interface address.
Abstracts over Arc<RwLock<Ipv4Addr>> on std. All clones of a
Client share the same handle, so writes from one clone (e.g.
Client::set_interface) are visible to all others.
On bare metal, where Client is not Clone, a trivial implementation
wrapping a core::cell::Cell<Ipv4Addr> suffices.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".