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 copy 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>where
S: RefUnwindSafe,
impl<S> Send for Connection<S>
impl<S> Sync for Connection<S>
impl<S> Unpin for Connection<S>
impl<S> UnwindSafe for Connection<S>where
S: RefUnwindSafe,
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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.