#[non_exhaustive]pub struct CAA {
pub issuer_critical: bool,
pub reserved_flags: u8,
pub tag: String,
pub value: Vec<u8>,
}Expand description
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.issuer_critical: boolIndicates that the corresponding property tag MUST be understood if the semantics of the CAA record are to be correctly interpreted by an issuer
reserved_flags: u8The flags of the record minus the issuer_critical flag
tag: StringThe property tag
value: Vec<u8>The raw value of the CAA record
Implementations§
Source§impl CAA
impl CAA
Sourcepub fn new_issue(
issuer_critical: bool,
name: Option<Name>,
options: Vec<KeyValue>,
) -> Self
pub fn new_issue( issuer_critical: bool, name: Option<Name>, options: Vec<KeyValue>, ) -> Self
Creates a new CAA issue record data, the tag is issue
§Arguments
issuer_critical- indicates that the corresponding property tag MUST be understood if the semantics of the CAA record are to be correctly interpreted by an issuername- authorized to issue certificates for the associated record labeloptions- additional options for the issuer, e.g. ‘account’, etc.
Sourcepub fn new_issuewild(
issuer_critical: bool,
name: Option<Name>,
options: Vec<KeyValue>,
) -> Self
pub fn new_issuewild( issuer_critical: bool, name: Option<Name>, options: Vec<KeyValue>, ) -> Self
Creates a new CAA issue record data, the tag is issuewild
§Arguments
issuer_critical- indicates that the corresponding property tag MUST be understood if the semantics of the CAA record are to be correctly interpreted by an issuername- authorized to issue certificates for the associated record labeloptions- additional options for the issuer, e.g. ‘account’, etc.
Sourcepub fn new_iodef(issuer_critical: bool, url: Url) -> Self
pub fn new_iodef(issuer_critical: bool, url: Url) -> Self
Creates a new CAA issue record data, the tag is iodef
§Arguments
issuer_critical- indicates that the corresponding property tag MUST be understood if the semantics of the CAA record are to be correctly interpreted by an issuerurl- Url where issuer errors should be reported
Sourcepub fn set_issuer_value(
&mut self,
name: Option<&Name>,
key_values: &[KeyValue],
) -> Result<(), ProtoError>
pub fn set_issuer_value( &mut self, name: Option<&Name>, key_values: &[KeyValue], ) -> Result<(), ProtoError>
Set the value associated with an issue or issuewild tag.
This returns an error if the tag is not issue or issuewild.
Sourcepub fn set_iodef_value(&mut self, url: &Url) -> Result<(), ProtoError>
pub fn set_iodef_value(&mut self, url: &Url) -> Result<(), ProtoError>
Set the value associated with an iodef tag.
This returns an error if the tag is not iodef.
Sourcepub fn value_as_issue(
&self,
) -> Result<(Option<Name>, Vec<KeyValue>), ProtoError>
pub fn value_as_issue( &self, ) -> Result<(Option<Name>, Vec<KeyValue>), ProtoError>
Get the value of an issue or issuewild CAA record.
This returns an error if the record’s tag is not issue or issuewild, or if the value
does not match the expected syntax.
Sourcepub fn value_as_iodef(&self) -> Result<Url, ProtoError>
pub fn value_as_iodef(&self) -> Result<Url, ProtoError>
Get the value of an iodef CAA record.
This returns an error if the record’s tag is not iodef, or if the value is an invalid URL.
Trait Implementations§
Source§impl BinEncodable for CAA
impl BinEncodable for CAA
Source§fn emit(&self, encoder: &mut BinEncoder<'_>) -> Result<(), ProtoError>
fn emit(&self, encoder: &mut BinEncoder<'_>) -> Result<(), ProtoError>
Source§impl RecordData for CAA
impl RecordData for CAA
Source§fn try_borrow(data: &RData) -> Option<&Self>
fn try_borrow(data: &RData) -> Option<&Self>
Source§fn record_type(&self) -> RecordType
fn record_type(&self) -> RecordType
Source§fn into_rdata(self) -> RData
fn into_rdata(self) -> RData
impl Eq for CAA
impl StructuralPartialEq for CAA
Auto Trait Implementations§
impl Freeze for CAA
impl RefUnwindSafe for CAA
impl Send for CAA
impl Sync for CAA
impl Unpin for CAA
impl UnsafeUnpin for CAA
impl UnwindSafe for CAA
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more