pub struct DnsRelayRequester { /* private fields */ }Expand description
Stateful HIP-76 requester with its own nonzero request-ID space.
Implementations§
Source§impl DnsRelayRequester
impl DnsRelayRequester
Sourcepub fn new(
first_request_id: NonZero<u64>,
limits: RequesterLimits,
) -> Result<DnsRelayRequester, P2pTransportError>
pub fn new( first_request_id: NonZero<u64>, limits: RequesterLimits, ) -> Result<DnsRelayRequester, P2pTransportError>
Create with an explicit unpredictable first request ID.
Sourcepub fn exchange<A>(
&mut self,
adapter: &mut A,
relay: &mut AuthenticatedPeer,
query: &Query,
cancellation: &CancellationToken,
now: u64,
deadline: u64,
) -> Result<AdmittedDnsResponse, P2pTransportError>where
A: ExperimentalExchange,
pub fn exchange<A>(
&mut self,
adapter: &mut A,
relay: &mut AuthenticatedPeer,
query: &Query,
cancellation: &CancellationToken,
now: u64,
deadline: u64,
) -> Result<AdmittedDnsResponse, P2pTransportError>where
A: ExperimentalExchange,
Execute one authenticated HIP-76 exchange.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DnsRelayRequester
impl RefUnwindSafe for DnsRelayRequester
impl Send for DnsRelayRequester
impl Sync for DnsRelayRequester
impl Unpin for DnsRelayRequester
impl UnsafeUnpin for DnsRelayRequester
impl UnwindSafe for DnsRelayRequester
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