pub trait Connection: Send + Sync {
// Required methods
fn send(&self, packet: &Packet) -> Result<Packet>;
fn iter(&self) -> Box<dyn Iterator<Item = Option<Packet>> + Send + Sync>;
// Provided methods
fn iter_until(
&self,
end: Instant,
) -> Box<dyn Iterator<Item = Packet> + Send + Sync> { ... }
fn iter_for(
&self,
duration: Duration,
) -> Box<dyn Iterator<Item = Packet> + Send + Sync> { ... }
}Required Methods§
Provided Methods§
fn iter_until( &self, end: Instant, ) -> Box<dyn Iterator<Item = Packet> + Send + Sync>
fn iter_for( &self, duration: Duration, ) -> Box<dyn Iterator<Item = Packet> + Send + Sync>
Trait Implementations§
Source§impl IntoIterator for &dyn Connection
impl IntoIterator for &dyn Connection
Source§impl IntoIterator for &mut dyn Connection
Represents an adapter. This may be RP1210, SocketCAN, simulated or J2534 (eventually)
impl IntoIterator for &mut dyn Connection
Represents an adapter. This may be RP1210, SocketCAN, simulated or J2534 (eventually)