pub struct PacketBuilder { /* private fields */ }Implementations§
Source§impl PacketBuilder
impl PacketBuilder
pub fn new() -> Self
Sourcepub fn add_question(&mut self, qname: &str, qtype: RRType) -> &mut Self
pub fn add_question(&mut self, qname: &str, qtype: RRType) -> &mut Self
Add a question to the packet
pub fn add_srv( &mut self, service_name: &str, port: u16, ttl: Duration, priority: u16, weight: u16, target: &str, ) -> &mut Self
pub fn add_a(&mut self, name: &str, addr: Ipv4Addr, ttl: Duration) -> &mut Self
Sourcepub fn add_txt<'a>(
&mut self,
service_name: &str,
txt: impl Iterator<Item = &'a str>,
ttl: Duration,
) -> Result<&mut Self, Error>
pub fn add_txt<'a>( &mut self, service_name: &str, txt: impl Iterator<Item = &'a str>, ttl: Duration, ) -> Result<&mut Self, Error>
Add txt records to the packet answers
Auto Trait Implementations§
impl Freeze for PacketBuilder
impl RefUnwindSafe for PacketBuilder
impl Send for PacketBuilder
impl Sync for PacketBuilder
impl Unpin for PacketBuilder
impl UnwindSafe for PacketBuilder
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