docs.rs failed to build dyn_phy-0.1.0-alpha1
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build:
dyn_phy-0.1.0-alpha3
dyn_phy
This crate provides DynPhy, DynTxToken, and DynRxToken, which are object-safe versions
of smoltcp's phy::Device, phy::RxToken, and phy::TxToken.
These Dyn* types are fully-compatible with and blanket-impled over the smoltcp types. They are
unfortunately only optimistically zero-alloc (i.e. they may allocate depending on closure sizes).
Examples
The motivating use-case for this functionality is dynamic dispatch over multiple PHY interfaces, e.g. for packet-switching. This crate makes the following possible:
use DynPhy;
use phy;
let mut loopback = new;
let mut fault_test = new;
// This would not be possible with phy::Device as it is not object-safe:
let mut devs = new;
devs.push;
devs.push;
for dev in &mut devs