pub struct UpdateMessageBuilder { /* private fields */ }Expand description
Build an IN-class UPDATE in call order. Names are absolute, with an optional trailing dot.
Use ASCII presentation names with \X or \DDD escapes; IDNs use Punycode.
Implementations§
Source§impl UpdateMessageBuilder
impl UpdateMessageBuilder
pub fn new(zone: impl Into<String>) -> Self
pub fn add_record(self, name: impl Into<String>, ttl: u32, rdata: RData) -> Self
Sourcepub fn delete_record(self, name: impl Into<String>, rtype: u16) -> Self
pub fn delete_record(self, name: impl Into<String>, rtype: u16) -> Self
Delete an entire RRset, or all RRsets at the name when rtype is ANY (255).
Sourcepub fn delete_record_value(self, name: impl Into<String>, rdata: RData) -> Self
pub fn delete_record_value(self, name: impl Into<String>, rdata: RData) -> Self
Delete only the record with matching RDATA; infer its type from rdata.
Sourcepub fn require_name_exists(self, name: impl Into<String>) -> Self
pub fn require_name_exists(self, name: impl Into<String>) -> Self
Require at least one record at this name, regardless of type.
Sourcepub fn require_name_absent(self, name: impl Into<String>) -> Self
pub fn require_name_absent(self, name: impl Into<String>) -> Self
Require no records at this name. Records at child names do not count.
Sourcepub fn require_rrset_exists(self, name: impl Into<String>, rtype: u16) -> Self
pub fn require_rrset_exists(self, name: impl Into<String>, rtype: u16) -> Self
Require at least one record of this type. ANY (255) is not an RRset type.
Sourcepub fn require_rrset_absent(self, name: impl Into<String>, rtype: u16) -> Self
pub fn require_rrset_absent(self, name: impl Into<String>, rtype: u16) -> Self
Require no records of this type. ANY (255) is not an RRset type.
Sourcepub fn require_rrset_equals(
self,
name: impl Into<String>,
values: impl IntoIterator<Item = RData>,
) -> Self
pub fn require_rrset_equals( self, name: impl Into<String>, values: impl IntoIterator<Item = RData>, ) -> Self
Require an exact RRset match, ignoring order and TTL. Values must be nonempty and of one type; calls for the same name/type combine.
Sourcepub fn build(self) -> Result<DnsUpdateMessage, EncodeError>
pub fn build(self) -> Result<DnsUpdateMessage, EncodeError>
Validate and build the unsigned request.
Auto Trait Implementations§
impl Freeze for UpdateMessageBuilder
impl RefUnwindSafe for UpdateMessageBuilder
impl Send for UpdateMessageBuilder
impl Sync for UpdateMessageBuilder
impl Unpin for UpdateMessageBuilder
impl UnsafeUnpin for UpdateMessageBuilder
impl UnwindSafe for UpdateMessageBuilder
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