pub struct DoHandshakeRequest<Z: NetworkZone, T: Transport<Z>> {
pub addr: InternalPeerID<Z::Addr>,
pub peer_stream: T::Stream,
pub peer_sink: T::Sink,
pub direction: ConnectionDirection,
pub permit: Option<OwnedSemaphorePermit>,
}Expand description
A request to complete a handshake.
Fields§
§addr: InternalPeerID<Z::Addr>The InternalPeerID of the peer we are handshaking with.
peer_stream: T::StreamThe receiving side of the connection.
peer_sink: T::SinkThe sending side of the connection.
direction: ConnectionDirectionThe direction of the connection.
permit: Option<OwnedSemaphorePermit>An Optional permit for this connection.
Trait Implementations§
Source§impl<Z: NetworkZone, T: Transport<Z>, AdrBook, CSync, ProtoHdlrMkr, BrdcstStrmMkr, BrdcstStrm> Service<DoHandshakeRequest<Z, T>> for HandShaker<Z, T, AdrBook, CSync, ProtoHdlrMkr, BrdcstStrmMkr>where
AdrBook: AddressBook<Z> + Clone,
CSync: CoreSyncSvc + Clone,
ProtoHdlrMkr: ProtocolRequestHandlerMaker<Z> + Clone,
BrdcstStrm: Stream<Item = BroadcastMessage> + Send + 'static,
BrdcstStrmMkr: Fn(InternalPeerID<Z::Addr>) -> BrdcstStrm + Clone + Send + 'static,
impl<Z: NetworkZone, T: Transport<Z>, AdrBook, CSync, ProtoHdlrMkr, BrdcstStrmMkr, BrdcstStrm> Service<DoHandshakeRequest<Z, T>> for HandShaker<Z, T, AdrBook, CSync, ProtoHdlrMkr, BrdcstStrmMkr>where
AdrBook: AddressBook<Z> + Clone,
CSync: CoreSyncSvc + Clone,
ProtoHdlrMkr: ProtocolRequestHandlerMaker<Z> + Clone,
BrdcstStrm: Stream<Item = BroadcastMessage> + Send + 'static,
BrdcstStrmMkr: Fn(InternalPeerID<Z::Addr>) -> BrdcstStrm + Clone + Send + 'static,
Source§type Error = HandshakeError
type Error = HandshakeError
Errors produced by the service.
Source§type Future = Pin<Box<dyn Future<Output = Result<<HandShaker<Z, T, AdrBook, CSync, ProtoHdlrMkr, BrdcstStrmMkr> as Service<DoHandshakeRequest<Z, T>>>::Response, <HandShaker<Z, T, AdrBook, CSync, ProtoHdlrMkr, BrdcstStrmMkr> as Service<DoHandshakeRequest<Z, T>>>::Error>> + Send>>
type Future = Pin<Box<dyn Future<Output = Result<<HandShaker<Z, T, AdrBook, CSync, ProtoHdlrMkr, BrdcstStrmMkr> as Service<DoHandshakeRequest<Z, T>>>::Response, <HandShaker<Z, T, AdrBook, CSync, ProtoHdlrMkr, BrdcstStrmMkr> as Service<DoHandshakeRequest<Z, T>>>::Error>> + Send>>
The future response value.
Source§fn poll_ready(&mut self, _: &mut Context<'_>) -> Poll<Result<(), Self::Error>>
fn poll_ready(&mut self, _: &mut Context<'_>) -> Poll<Result<(), Self::Error>>
Returns
Poll::Ready(Ok(())) when the service is able to process requests. Read moreSource§fn call(&mut self, req: DoHandshakeRequest<Z, T>) -> Self::Future
fn call(&mut self, req: DoHandshakeRequest<Z, T>) -> Self::Future
Process the request and return the response asynchronously. Read more
Auto Trait Implementations§
impl<Z, T> !RefUnwindSafe for DoHandshakeRequest<Z, T>
impl<Z, T> !UnwindSafe for DoHandshakeRequest<Z, T>
impl<Z, T> Freeze for DoHandshakeRequest<Z, T>
impl<Z, T> Send for DoHandshakeRequest<Z, T>
impl<Z, T> Sync for DoHandshakeRequest<Z, T>
impl<Z, T> Unpin for DoHandshakeRequest<Z, T>
impl<Z, T> UnsafeUnpin for DoHandshakeRequest<Z, T>where
<T as Transport<Z>>::Stream: UnsafeUnpin,
<T as Transport<Z>>::Sink: UnsafeUnpin,
<Z as NetworkZone>::Addr: UnsafeUnpin,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
Layout§
Note: Unable to compute type layout, possibly due to this type having generic parameters. Layout can only be computed for concrete, fully-instantiated types.