#[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.