Trait iroh_gossip::proto::topic::IO
source · pub trait IO<PI: Clone> {
// Required method
fn push(&mut self, event: impl Into<OutEvent<PI>>);
// Provided method
fn push_from_iter(
&mut self,
iter: impl IntoIterator<Item = impl Into<OutEvent<PI>>>
) { ... }
}
Expand description
A trait for a concrete type to push OutEvent
s to.
The implementation is generic over this trait, which allows the upper layer to supply a
container of their choice for OutEvent
s emitted from the protocol state.
Required Methods§
Provided Methods§
sourcefn push_from_iter(
&mut self,
iter: impl IntoIterator<Item = impl Into<OutEvent<PI>>>
)
fn push_from_iter( &mut self, iter: impl IntoIterator<Item = impl Into<OutEvent<PI>>> )
Push all events from an iterator into the IO container
Object Safety§
This trait is not object safe.