pub struct TopicHandshakeAcceptor<T, Evt> {
pub event_tx: Sender<Evt>,
/* private fields */
}Expand description
Acceptor side of the topic handshake protocol.
After the protocol is complete both peers know the T of the initiator.
Fields§
§event_tx: Sender<Evt>Implementations§
Source§impl<T, Evt> TopicHandshakeAcceptor<T, Evt>
impl<T, Evt> TopicHandshakeAcceptor<T, Evt>
Trait Implementations§
Source§impl<T, Evt> Protocol for TopicHandshakeAcceptor<T, Evt>where
T: Clone + Debug + for<'de> Deserialize<'de> + Serialize + Send + Sync + 'static,
Evt: From<TopicHandshakeEvent<T>>,
impl<T, Evt> Protocol for TopicHandshakeAcceptor<T, Evt>where
T: Clone + Debug + for<'de> Deserialize<'de> + Serialize + Send + Sync + 'static,
Evt: From<TopicHandshakeEvent<T>>,
type Error = TopicHandshakeError<T>
type Output = T
type Message = TopicHandshakeMessage<T>
async fn run( self, sink: &mut (impl Sink<Self::Message, Error = impl Debug> + Unpin), stream: &mut (impl Stream<Item = Result<Self::Message, impl Debug>> + Unpin), ) -> Result<Self::Output, Self::Error>
Auto Trait Implementations§
impl<T, Evt> Freeze for TopicHandshakeAcceptor<T, Evt>
impl<T, Evt> !RefUnwindSafe for TopicHandshakeAcceptor<T, Evt>
impl<T, Evt> Send for TopicHandshakeAcceptor<T, Evt>
impl<T, Evt> Sync for TopicHandshakeAcceptor<T, Evt>
impl<T, Evt> Unpin for TopicHandshakeAcceptor<T, Evt>where
T: Unpin,
impl<T, Evt> !UnwindSafe for TopicHandshakeAcceptor<T, Evt>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more