pub struct SecurityTxt {
pub acknowledgments: Vec<AcknowledgmentsField>,
pub canonical: Vec<CanonicalField>,
pub contact: Vec<ContactField>,
pub csaf: Vec<CsafField>,
pub encryption: Vec<EncryptionField>,
pub expires: ExpiresField,
pub extension: Vec<ExtensionField>,
pub hiring: Vec<HiringField>,
pub policy: Vec<PolicyField>,
pub preferred_languages: Option<PreferredLanguagesField>,
}Expand description
A representation of an RFC 9116 security.txt file
Fields§
§acknowledgments: Vec<AcknowledgmentsField>A collection of “Acknowledgments” fields
canonical: Vec<CanonicalField>A collection of “Canonical” fields
contact: Vec<ContactField>A collection of “Contact” fields
csaf: Vec<CsafField>A collection of “CSAF” fields,
encryption: Vec<EncryptionField>A collection of “Encryption” fields
expires: ExpiresFieldThe “Expires” field
extension: Vec<ExtensionField>A collection of “Extension” fields
hiring: Vec<HiringField>A collection of “Hiring” fields
policy: Vec<PolicyField>A collection of “Policy” fields
preferred_languages: Option<PreferredLanguagesField>The “Preferred-Languages” field, if available
Implementations§
Source§impl SecurityTxt
impl SecurityTxt
Sourcepub fn parse(text: &str) -> Result<Self, ParseError>
pub fn parse(text: &str) -> Result<Self, ParseError>
Parses a security.txt file as a string according to RFC 9116.
Sourcepub fn parse_with(
text: &str,
options: &SecurityTxtOptions,
) -> Result<Self, ParseError>
pub fn parse_with( text: &str, options: &SecurityTxtOptions, ) -> Result<Self, ParseError>
Parses a security.txt file as a string according to RFC 9116.
Trait Implementations§
Source§impl Debug for SecurityTxt
impl Debug for SecurityTxt
Source§impl FromStr for SecurityTxt
impl FromStr for SecurityTxt
Source§impl PartialEq for SecurityTxt
impl PartialEq for SecurityTxt
Source§impl PartialOrd for SecurityTxt
impl PartialOrd for SecurityTxt
Source§impl Structable for SecurityTxt
impl Structable for SecurityTxt
Source§fn definition(&self) -> StructDef<'_>
fn definition(&self) -> StructDef<'_>
Returns the struct’s definition. Read more
Source§impl Valuable for SecurityTxt
impl Valuable for SecurityTxt
impl StructuralPartialEq for SecurityTxt
Auto Trait Implementations§
impl Freeze for SecurityTxt
impl RefUnwindSafe for SecurityTxt
impl Send for SecurityTxt
impl Sync for SecurityTxt
impl Unpin for SecurityTxt
impl UnwindSafe for SecurityTxt
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