Struct domain::net::client::dgram_stream::Connection
source · pub struct Connection<DgramS, Req> { /* private fields */ }
Expand description
DNS transport connection that first issues a query over a UDP transport and falls back to TCP if the reply is truncated.
Implementations§
source§impl<DgramS, Req> Connection<DgramS, Req>where
DgramS: AsyncConnect + Clone + Send + Sync + 'static,
DgramS::Connection: AsyncDgramRecv + AsyncDgramSend + Send + Sync + Unpin + 'static,
impl<DgramS, Req> Connection<DgramS, Req>where
DgramS: AsyncConnect + Clone + Send + Sync + 'static,
DgramS::Connection: AsyncDgramRecv + AsyncDgramSend + Send + Sync + Unpin + 'static,
sourcepub fn new<StreamS>(
dgram_remote: DgramS,
stream_remote: StreamS,
) -> (Self, Transport<StreamS, Req>)
pub fn new<StreamS>( dgram_remote: DgramS, stream_remote: StreamS, ) -> (Self, Transport<StreamS, Req>)
Creates a new multi-stream transport with default configuration.
sourcepub fn with_config<StreamS>(
dgram_remote: DgramS,
stream_remote: StreamS,
config: Config,
) -> (Self, Transport<StreamS, Req>)
pub fn with_config<StreamS>( dgram_remote: DgramS, stream_remote: StreamS, config: Config, ) -> (Self, Transport<StreamS, Req>)
Creates a new multi-stream transport.
Trait Implementations§
source§impl<DgramS: Clone, Req: Clone> Clone for Connection<DgramS, Req>
impl<DgramS: Clone, Req: Clone> Clone for Connection<DgramS, Req>
source§fn clone(&self) -> Connection<DgramS, Req>
fn clone(&self) -> Connection<DgramS, Req>
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<DgramS, Req> SendRequest<Req> for Connection<DgramS, Req>where
DgramS: AsyncConnect + Clone + Debug + Send + Sync + 'static,
DgramS::Connection: AsyncDgramRecv + AsyncDgramSend + Send + Sync + Unpin,
Req: ComposeRequest + Clone + 'static,
impl<DgramS, Req> SendRequest<Req> for Connection<DgramS, Req>where
DgramS: AsyncConnect + Clone + Debug + Send + Sync + 'static,
DgramS::Connection: AsyncDgramRecv + AsyncDgramSend + Send + Sync + Unpin,
Req: ComposeRequest + Clone + '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<DgramS, Req> Freeze for Connection<DgramS, Req>
impl<DgramS, Req> RefUnwindSafe for Connection<DgramS, Req>where
DgramS: RefUnwindSafe,
impl<DgramS, Req> Send for Connection<DgramS, Req>
impl<DgramS, Req> Sync for Connection<DgramS, Req>
impl<DgramS, Req> Unpin for Connection<DgramS, Req>
impl<DgramS, Req> UnwindSafe for Connection<DgramS, Req>where
DgramS: 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.