pub struct Connection<S> { /* private fields */ }
Expand description
A datagram protocol connection.
Implementations§
Source§impl<S> Connection<S>
impl<S> Connection<S>
Sourcepub fn with_config(connect: S, config: Config) -> Self
pub fn with_config(connect: S, config: Config) -> Self
Create a new datagram transport with a given configuration.
Trait Implementations§
Source§impl<S: Clone> Clone for Connection<S>
impl<S: Clone> Clone for Connection<S>
Source§fn clone(&self) -> Connection<S>
fn clone(&self) -> Connection<S>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<S: Debug> Debug for Connection<S>
impl<S: Debug> Debug for Connection<S>
Source§impl<S, Req> SendRequest<Req> for Connection<S>where
S: AsyncConnect + Clone + Send + Sync + 'static,
S::Connection: AsyncDgramRecv + AsyncDgramSend + Send + Sync + Unpin + 'static,
Req: ComposeRequest + Send + Sync + 'static,
impl<S, Req> SendRequest<Req> for Connection<S>where
S: AsyncConnect + Clone + Send + Sync + 'static,
S::Connection: AsyncDgramRecv + AsyncDgramSend + Send + Sync + Unpin + 'static,
Req: ComposeRequest + Send + Sync + 'static,
Source§fn send_request(&self, request_msg: Req) -> Box<dyn GetResponse + Send + Sync>
fn send_request(&self, request_msg: Req) -> Box<dyn GetResponse + Send + Sync>
Request function that takes a ComposeRequest type.
Auto Trait Implementations§
impl<S> Freeze for Connection<S>
impl<S> !RefUnwindSafe for Connection<S>
impl<S> Send for Connection<S>
impl<S> Sync for Connection<S>
impl<S> Unpin for Connection<S>
impl<S> !UnwindSafe for Connection<S>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<Source, Target> OctetsInto<Target> for Sourcewhere
Target: OctetsFrom<Source>,
impl<Source, Target> OctetsInto<Target> for Sourcewhere
Target: OctetsFrom<Source>,
type Error = <Target as OctetsFrom<Source>>::Error
Source§fn try_octets_into(
self,
) -> Result<Target, <Source as OctetsInto<Target>>::Error>
fn try_octets_into( self, ) -> Result<Target, <Source as OctetsInto<Target>>::Error>
Performs the conversion.
Source§fn octets_into(self) -> Target
fn octets_into(self) -> Target
Performs an infallible conversion.