Struct sectxtlib::SecurityTxt
source · pub struct SecurityTxt {
pub acknowledgments: Vec<AcknowledgmentsField>,
pub canonical: Vec<CanonicalField>,
pub contact: Vec<ContactField>,
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
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§fn eq(&self, other: &SecurityTxt) -> bool
fn eq(&self, other: &SecurityTxt) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl PartialOrd for SecurityTxt
impl PartialOrd for SecurityTxt
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moresource§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 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