pub enum OpCode {
Query,
Status,
Notify,
Update,
}
Expand description
Operation code for queries, updates, and responses
RFC 1035, DOMAIN NAMES - IMPLEMENTATION AND SPECIFICATION, November 1987
OPCODE A four bit field that specifies kind of query in this
message. This value is set by the originator of a query
and copied into the response. The values are:
0 a standard query (QUERY)
1 an inverse query (IQUERY)
2 a server status request (STATUS)
3-15 reserved for future use
Variants
Query
Query request RFC 1035
Status
Status message RFC 1035
Notify
Notify of change RFC 1996
Update
Update message RFC 2136
Implementations
Trait Implementations
sourceimpl From<OpCode> for u8
impl From<OpCode> for u8
Convert from OpCode
to u8
use std::convert::From;
use trust_dns_proto::op::op_code::OpCode;
let var: u8 = From::from(OpCode::Query);
assert_eq!(0, var);
let var: u8 = OpCode::Query.into();
assert_eq!(0, var);
sourceimpl PartialOrd<OpCode> for OpCode
impl PartialOrd<OpCode> for OpCode
sourcefn partial_cmp(&self, other: &OpCode) -> Option<Ordering>
fn partial_cmp(&self, other: &OpCode) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl Copy for OpCode
impl Eq for OpCode
impl StructuralEq for OpCode
impl StructuralPartialEq for OpCode
Auto Trait Implementations
impl RefUnwindSafe for OpCode
impl Send for OpCode
impl Sync for OpCode
impl Unpin for OpCode
impl UnwindSafe for OpCode
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more