Struct webrtc_mdns::message::resource::ResourceHeader
source · [−]pub struct ResourceHeader {
pub name: Name,
pub typ: DnsType,
pub class: DnsClass,
pub ttl: u32,
pub length: u16,
}
Fields
name: Name
typ: DnsType
class: DnsClass
ttl: u32
length: u16
Implementations
sourceimpl ResourceHeader
impl ResourceHeader
pub fn pack(
&self,
msg: Vec<u8>,
compression: &mut Option<HashMap<String, usize>>,
compression_off: usize
) -> Result<(Vec<u8>, usize), Error>
pub fn unpack(
&mut self,
msg: &[u8],
off: usize,
_length: usize
) -> Result<usize, Error>
pub fn fix_len(
&mut self,
msg: &mut [u8],
len_off: usize,
pre_len: usize
) -> Result<(), Error>
pub fn set_edns0(
&mut self,
udp_payload_len: u16,
ext_rcode: u32,
dnssec_ok: bool
) -> Result<(), Error>
pub fn dnssec_allowed(&self) -> bool
pub fn extended_rcode(&self, rcode: RCode) -> RCode
Trait Implementations
sourceimpl Clone for ResourceHeader
impl Clone for ResourceHeader
sourcefn clone(&self) -> ResourceHeader
fn clone(&self) -> ResourceHeader
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for ResourceHeader
impl Debug for ResourceHeader
sourceimpl Default for ResourceHeader
impl Default for ResourceHeader
sourcefn default() -> ResourceHeader
fn default() -> ResourceHeader
Returns the “default value” for a type. Read more
sourceimpl Display for ResourceHeader
impl Display for ResourceHeader
sourceimpl PartialEq<ResourceHeader> for ResourceHeader
impl PartialEq<ResourceHeader> for ResourceHeader
sourcefn eq(&self, other: &ResourceHeader) -> bool
fn eq(&self, other: &ResourceHeader) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &ResourceHeader) -> bool
fn ne(&self, other: &ResourceHeader) -> bool
This method tests for !=
.
impl Eq for ResourceHeader
impl StructuralEq for ResourceHeader
impl StructuralPartialEq for ResourceHeader
Auto Trait Implementations
impl RefUnwindSafe for ResourceHeader
impl Send for ResourceHeader
impl Sync for ResourceHeader
impl Unpin for ResourceHeader
impl UnwindSafe for ResourceHeader
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