pub struct DnsUdpSocket(/* private fields */);
Expand description
A Fuchsia-compatible implementation of trust-dns’s UdpSocket
trait which allows
creating a UdpSocket to a particular destination.
Trait Implementations§
Source§impl UdpSocket for DnsUdpSocket
impl UdpSocket for DnsUdpSocket
Source§type Time = FuchsiaTime
type Time = FuchsiaTime
Time implementation used for this type
Source§fn connect_with_bind<'async_trait>(
_addr: SocketAddr,
bind_addr: SocketAddr,
) -> Pin<Box<dyn Future<Output = Result<Self>> + Send + 'async_trait>>where
Self: 'async_trait,
fn connect_with_bind<'async_trait>(
_addr: SocketAddr,
bind_addr: SocketAddr,
) -> Pin<Box<dyn Future<Output = Result<Self>> + Send + 'async_trait>>where
Self: 'async_trait,
same as connect, but binds to the specified local address for seding address
Source§fn connect<'async_trait>(
addr: SocketAddr,
) -> Pin<Box<dyn Future<Output = Result<Self>> + Send + 'async_trait>>where
Self: 'async_trait,
fn connect<'async_trait>(
addr: SocketAddr,
) -> Pin<Box<dyn Future<Output = Result<Self>> + Send + 'async_trait>>where
Self: 'async_trait,
setups up a “client” udp connection that will only receive packets from the associated address
Source§fn bind<'async_trait>(
addr: SocketAddr,
) -> Pin<Box<dyn Future<Output = Result<Self>> + Send + 'async_trait>>where
Self: 'async_trait,
fn bind<'async_trait>(
addr: SocketAddr,
) -> Pin<Box<dyn Future<Output = Result<Self>> + Send + 'async_trait>>where
Self: 'async_trait,
a “server” UDP socket, that bind to the local listening address, and unbound remote address (can receive from anything)
Source§fn poll_recv_from(
&self,
cx: &mut Context<'_>,
buf: &mut [u8],
) -> Poll<Result<(usize, SocketAddr)>>
fn poll_recv_from( &self, cx: &mut Context<'_>, buf: &mut [u8], ) -> Poll<Result<(usize, SocketAddr)>>
Poll once Receive data from the socket and returns the number of bytes read and the address from
where the data came on success.
Source§fn recv_from<'life0, 'life1, 'async_trait>(
&'life0 self,
buf: &'life1 mut [u8],
) -> Pin<Box<dyn Future<Output = Result<(usize, SocketAddr)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn recv_from<'life0, 'life1, 'async_trait>(
&'life0 self,
buf: &'life1 mut [u8],
) -> Pin<Box<dyn Future<Output = Result<(usize, SocketAddr)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Receive data from the socket and returns the number of bytes read and the address from
where the data came on success.
Source§fn poll_send_to(
&self,
cx: &mut Context<'_>,
buf: &[u8],
target: SocketAddr,
) -> Poll<Result<usize>>
fn poll_send_to( &self, cx: &mut Context<'_>, buf: &[u8], target: SocketAddr, ) -> Poll<Result<usize>>
Poll once to send data to the given address.
Auto Trait Implementations§
impl Freeze for DnsUdpSocket
impl !RefUnwindSafe for DnsUdpSocket
impl Send for DnsUdpSocket
impl Sync for DnsUdpSocket
impl Unpin for DnsUdpSocket
impl !UnwindSafe for DnsUdpSocket
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
§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T, U> TryIntoExt<U> for Twhere
U: TryFromExt<T>,
impl<T, U> TryIntoExt<U> for Twhere
U: TryFromExt<T>,
type Error = <U as TryFromExt<T>>::Error
§fn try_into_ext(self) -> Result<U, <T as TryIntoExt<U>>::Error>
fn try_into_ext(self) -> Result<U, <T as TryIntoExt<U>>::Error>
Tries to perform the conversion.