Struct qaul_messaging::protocol::QaulMessagingProtocol
source · [−]pub struct QaulMessagingProtocol {}
Expand description
Implementation of ConnectionUpgrade
for the qaul_messaging protocol.
Implementations
sourceimpl QaulMessagingProtocol
impl QaulMessagingProtocol
sourcepub fn new() -> QaulMessagingProtocol
pub fn new() -> QaulMessagingProtocol
Builds a new QaulMessagingProtocol
.
Trait Implementations
sourceimpl Clone for QaulMessagingProtocol
impl Clone for QaulMessagingProtocol
sourcefn clone(&self) -> QaulMessagingProtocol
fn clone(&self) -> QaulMessagingProtocol
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 QaulMessagingProtocol
impl Debug for QaulMessagingProtocol
sourceimpl Default for QaulMessagingProtocol
impl Default for QaulMessagingProtocol
sourcefn default() -> QaulMessagingProtocol
fn default() -> QaulMessagingProtocol
Returns the “default value” for a type. Read more
sourceimpl<TSocket> InboundUpgrade<TSocket> for QaulMessagingProtocol where
TSocket: AsyncRead + AsyncWrite + Send + Unpin + 'static,
impl<TSocket> InboundUpgrade<TSocket> for QaulMessagingProtocol where
TSocket: AsyncRead + AsyncWrite + Send + Unpin + 'static,
type Output = QaulMessagingData
type Output = QaulMessagingData
Output after the upgrade has been successfully negotiated and the handshake performed.
type Future = Pin<Box<dyn Future<Output = Result<<QaulMessagingProtocol as InboundUpgrade<TSocket>>::Output, <QaulMessagingProtocol as InboundUpgrade<TSocket>>::Error>> + Send + 'static, Global>>
type Future = Pin<Box<dyn Future<Output = Result<<QaulMessagingProtocol as InboundUpgrade<TSocket>>::Output, <QaulMessagingProtocol 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 QaulMessagingProtocol
impl UpgradeInfo for QaulMessagingProtocol
type InfoIter = Once<<QaulMessagingProtocol as UpgradeInfo>::Info>
type InfoIter = Once<<QaulMessagingProtocol 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 QaulMessagingProtocol
impl Send for QaulMessagingProtocol
impl Sync for QaulMessagingProtocol
impl Unpin for QaulMessagingProtocol
impl UnwindSafe for QaulMessagingProtocol
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
.