pub(crate) struct CaaRecords(pub(crate) Mutex<BTreeMap<String, Vec<CaaValue>>>);Expand description
Shared CAA bookkeeping.
Not TxtRecords, whose insert is additive; this one replaces, for the
reason DnsProvider::publish_caa gives.
Tuple Fields§
§0: Mutex<BTreeMap<String, Vec<CaaValue>>>Implementations§
Source§impl CaaRecords
impl CaaRecords
Sourcepub(crate) fn map(&self) -> MutexGuard<'_, BTreeMap<String, Vec<CaaValue>>>
pub(crate) fn map(&self) -> MutexGuard<'_, BTreeMap<String, Vec<CaaValue>>>
Takes the lock, recovering from a poisoned mutex; see
TxtRecords::map for why that is safe here too.
Sourcepub(crate) fn replace(&self, host: &str, values: &[CaaValue]) -> bool
pub(crate) fn replace(&self, host: &str, values: &[CaaValue]) -> bool
Sets the set at host to values, or removes the name when values
is empty. Returns whether anything changed, so a caller can skip a
redundant network write when a restart restates what is already there.
pub(crate) fn values(&self, host: &str) -> Vec<CaaValue>
Trait Implementations§
Source§impl Debug for CaaRecords
impl Debug for CaaRecords
Source§impl Default for CaaRecords
impl Default for CaaRecords
Source§fn default() -> CaaRecords
fn default() -> CaaRecords
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for CaaRecords
impl RefUnwindSafe for CaaRecords
impl Send for CaaRecords
impl Sync for CaaRecords
impl Unpin for CaaRecords
impl UnsafeUnpin for CaaRecords
impl UnwindSafe for CaaRecords
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