pub struct Context<'a> {
pub query: Message<'a>,
pub client: SocketAddr,
pub local: SocketAddr,
pub transport: Transport,
pub protocol: Protocol,
pub domain: &'a Name,
pub metadata: Metadata<'a>,
pub response: &'a mut Vec<u8>,
pub max_response_size: usize,
}Expand description
Borrowed Query state and reusable, preallocated Response buffer.
Fields§
§query: Message<'a>§client: SocketAddr§local: SocketAddrListener address; wildcard addresses are not resolved per Query.
transport: Transport§protocol: Protocol§domain: &'a Name§metadata: Metadata<'a>§response: &'a mut Vec<u8>§max_response_size: usizeImplementations§
Source§impl Context<'_>
impl Context<'_>
Sourcepub fn self_lookup_handle(&self) -> Option<SelfLookupHandle>
pub fn self_lookup_handle(&self) -> Option<SelfLookupHandle>
Retain this Query’s Listener state for a detached task, if available.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for Context<'a>
impl<'a> !UnwindSafe for Context<'a>
impl<'a> Forget for Context<'a>
impl<'a> Freeze for Context<'a>
impl<'a> Move for Context<'a>
impl<'a> Send for Context<'a>
impl<'a> Sync for Context<'a>
impl<'a> Unpin for Context<'a>
impl<'a> UnsafeUnpin for Context<'a>
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