Struct trust_dns_proto::xfer::SerialMessage
source · pub struct SerialMessage { /* private fields */ }
Expand description
A DNS message in serialized form, with either the target address or source address
Implementations
sourceimpl SerialMessage
impl SerialMessage
sourcepub fn new(message: Vec<u8>, addr: SocketAddr) -> Self
pub fn new(message: Vec<u8>, addr: SocketAddr) -> Self
Construct a new SerialMessage and the source or destination address
sourcepub fn addr(&self) -> SocketAddr
pub fn addr(&self) -> SocketAddr
Get the source or destination address (context dependent)
sourcepub fn unwrap(self) -> (Vec<u8>, SocketAddr)
pub fn unwrap(self) -> (Vec<u8>, SocketAddr)
Unwrap the the Bytes and address
sourcepub fn to_message(&self) -> ProtoResult<Message>
pub fn to_message(&self) -> ProtoResult<Message>
Deserializes the inner data into a Message
Auto Trait Implementations
impl RefUnwindSafe for SerialMessage
impl Send for SerialMessage
impl Sync for SerialMessage
impl Unpin for SerialMessage
impl UnwindSafe for SerialMessage
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more