Struct qaul_info::protocol::QaulInfoProtocol
source · [−]pub struct QaulInfoProtocol {}
Expand description
Implementation of ConnectionUpgrade
for the qaul_info protocol.
Implementations
sourceimpl QaulInfoProtocol
impl QaulInfoProtocol
sourcepub fn new() -> QaulInfoProtocol
pub fn new() -> QaulInfoProtocol
Builds a new QaulInfoProtocol
.
Trait Implementations
sourceimpl Clone for QaulInfoProtocol
impl Clone for QaulInfoProtocol
sourcefn clone(&self) -> QaulInfoProtocol
fn clone(&self) -> QaulInfoProtocol
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for QaulInfoProtocol
impl Debug for QaulInfoProtocol
sourceimpl Default for QaulInfoProtocol
impl Default for QaulInfoProtocol
sourcefn default() -> QaulInfoProtocol
fn default() -> QaulInfoProtocol
Returns the “default value” for a type. Read more
sourceimpl<TSocket> InboundUpgrade<TSocket> for QaulInfoProtocol where
TSocket: AsyncRead + AsyncWrite + Send + Unpin + 'static,
impl<TSocket> InboundUpgrade<TSocket> for QaulInfoProtocol where
TSocket: AsyncRead + AsyncWrite + Send + Unpin + 'static,
type Output = QaulInfoData
type Output = QaulInfoData
Output after the upgrade has been successfully negotiated and the handshake performed.
type Future = Pin<Box<dyn Future<Output = Result<<QaulInfoProtocol as InboundUpgrade<TSocket>>::Output, <QaulInfoProtocol as InboundUpgrade<TSocket>>::Error>> + Send + 'static, Global>>
type Future = Pin<Box<dyn Future<Output = Result<<QaulInfoProtocol as InboundUpgrade<TSocket>>::Output, <QaulInfoProtocol as InboundUpgrade<TSocket>>::Error>> + Send + 'static, Global>>
Future that performs the handshake with the remote.
sourcefn upgrade_inbound(self, substream: TSocket, _info: Self::Info) -> Self::Future
fn upgrade_inbound(self, substream: TSocket, _info: Self::Info) -> Self::Future
After we have determined that the remote supports one of the protocols we support, this method is called to start the handshake. Read more
sourceimpl UpgradeInfo for QaulInfoProtocol
impl UpgradeInfo for QaulInfoProtocol
type InfoIter = Once<<QaulInfoProtocol as UpgradeInfo>::Info>
type InfoIter = Once<<QaulInfoProtocol as UpgradeInfo>::Info>
Iterator returned by protocol_info
.
sourcefn protocol_info(&self) -> Self::InfoIter
fn protocol_info(&self) -> Self::InfoIter
Returns the list of protocols that are supported. Used during the negotiation process.
Auto Trait Implementations
impl RefUnwindSafe for QaulInfoProtocol
impl Send for QaulInfoProtocol
impl Sync for QaulInfoProtocol
impl Unpin for QaulInfoProtocol
impl UnwindSafe for QaulInfoProtocol
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<C, U> InboundUpgradeExt<C> for U where
U: InboundUpgrade<C>,
impl<C, U> InboundUpgradeExt<C> for U where
U: InboundUpgrade<C>,
fn map_inbound<F, T>(self, f: F) -> MapInboundUpgrade<Self, F> where
F: FnOnce(Self::Output) -> T,
fn map_inbound<F, T>(self, f: F) -> MapInboundUpgrade<Self, F> where
F: FnOnce(Self::Output) -> T,
Returns a new object that wraps around Self
and applies a closure to the Output
.
fn map_inbound_err<F, T>(self, f: F) -> MapInboundUpgradeErr<Self, F> where
F: FnOnce(Self::Error) -> T,
fn map_inbound_err<F, T>(self, f: F) -> MapInboundUpgradeErr<Self, F> where
F: FnOnce(Self::Error) -> T,
Returns a new object that wraps around Self
and applies a closure to the Error
.