emcyphal_driver/
internal.rs

1/// Private interfaces for emcyphal Node
2///
3/// Drivers should not use this module.
4/// Backward-incompatible changes can be made without major version bump.
5use core::task::{Context, Poll};
6use emcyphal_core::PrioritySet;
7
8use crate::frame::{Frame, Mtu};
9use crate::link::FilterUpdate;
10
11pub trait DynamicRxFilter {
12    fn poll_pop(&self, cx: &mut Context<'_>) -> Poll<FilterUpdate>;
13}
14
15pub trait DynamicRx {
16    fn poll_push(&self, cx: &mut Context<'_>, frame: &Frame, mtu: Mtu) -> Poll<()>;
17}
18
19pub trait DynamicTx {
20    fn poll_pop(&self, cx: &mut Context<'_>, priority_mask: PrioritySet, mtu: Mtu) -> Poll<Frame>;
21}
22
23pub trait DynamicLink: DynamicRxFilter + DynamicRx + DynamicTx {}