pub struct BadgeRecord { /* private fields */ }Expand description
Parsed badge TXT record from _ans-badge or _ra-badge DNS records.
In production, construct via BadgeRecord::parse. A BadgeRecord::new
constructor is available only when the test-support feature is enabled.
Implementations§
Source§impl BadgeRecord
impl BadgeRecord
Sourcepub fn format_version(&self) -> &str
pub fn format_version(&self) -> &str
Returns the format version (e.g., “ans-badge1” or “ra-badge1”).
Sourcepub fn version(&self) -> Option<&Version>
pub fn version(&self) -> Option<&Version>
Returns the agent version this badge represents, if specified.
Sourcepub fn parse(txt: &str) -> Result<Self, ParseError>
pub fn parse(txt: &str) -> Result<Self, ParseError>
Parse from TXT record string.
Accepts both new and legacy formats:
v=ans-badge1; version=v1.0.0; url=https://...v=ra-badge1; version=v1.0.0; url=https://...v=ans-badge1;version=v1.0.0;url=https://...(no spaces)
Version field is optional.
Trait Implementations§
Source§impl Clone for BadgeRecord
impl Clone for BadgeRecord
Source§fn clone(&self) -> BadgeRecord
fn clone(&self) -> BadgeRecord
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for BadgeRecord
impl RefUnwindSafe for BadgeRecord
impl Send for BadgeRecord
impl Sync for BadgeRecord
impl Unpin for BadgeRecord
impl UnsafeUnpin for BadgeRecord
impl UnwindSafe for BadgeRecord
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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