Struct trust_dns::op::message::Message
[−]
[src]
pub struct Message { // some fields omitted }
By default Message is a Query. Use the Message::as_update() to create and update, or Message::new_update()
Methods
impl Message
[src]
fn new() -> Self
fn id(&mut self, id: u16) -> &mut Self
fn message_type(&mut self, message_type: MessageType) -> &mut Self
fn op_code(&mut self, op_code: OpCode) -> &mut Self
fn authoritative(&mut self, authoritative: bool) -> &mut Self
fn truncated(&mut self, truncated: bool) -> &mut Self
fn recursion_desired(&mut self, recursion_desired: bool) -> &mut Self
fn recursion_available(&mut self, recursion_available: bool) -> &mut Self
fn response_code(&mut self, response_code: ResponseCode) -> &mut Self
fn add_query(&mut self, query: Query) -> &mut Self
fn add_answer(&mut self, record: Record) -> &mut Self
fn add_all_answers(&mut self, vector: &[Record]) -> &mut Self
fn add_name_server(&mut self, record: Record) -> &mut Self
fn add_all_name_servers(&mut self, vector: &[Record]) -> &mut Self
fn add_additional(&mut self, record: Record) -> &mut Self
fn get_id(&self) -> u16
fn get_message_type(&self) -> MessageType
fn get_op_code(&self) -> OpCode
fn is_authoritative(&self) -> bool
fn is_truncated(&self) -> bool
fn is_recursion_desired(&self) -> bool
fn is_recursion_available(&self) -> bool
fn get_response_code(&self) -> ResponseCode
fn get_queries(&self) -> &[Query]
fn get_answers(&self) -> &[Record]
fn get_name_servers(&self) -> &[Record]
fn get_additional(&self) -> &[Record]
fn update_counts(&mut self) -> &mut Self
this is necessary to match the counts in the header from the record sections this happens implicitly on write_to, so no need to call before write_to
Trait Implementations
impl PartialEq for Message
[src]
fn eq(&self, __arg_0: &Message) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Message) -> bool
This method tests for !=
.
impl Debug for Message
[src]
impl UpdateMessage for Message
[src]
to reduce errors in using the Message struct as an Update, this will do the call throughs to properly do that.