You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
atom:content MAY have a "src" attribute, whose value MUST be an IRI reference RFC3987. If the "src" attribute is present, atom:content MUST be empty.
The current structure of Content is:
pubstructContent{/// Base URL for resolving any relative references found in the element.pubbase:Option<String>,/// Indicates the natural language for the element.publang:Option<String>,/// The text value of the content.pubvalue:Option<String>,/// The URI of where the content can be found.pubsrc:Option<String>,/// Either "text", "html", "xhtml", or the MIME type of the content.pubcontent_type:Option<String>,}
Given the text in the RFC, part of me thinks Content should be an enum akin to:
Indeed, such enum would prevent someone to author a non-compliant RSS. On the other hand, it won't parse and reject such RSS too. Having a struct allows to consume non-compliant RSS and let a user to make a choice.
If nothing else, might be useful to add a note to the struct docstring - for someone like me who's only ever looked at the spec once in an eternity, it might be a helpful thing to call out so people don't further author non-compliant feeds.
Appreciate the library!
RFC 4287 notes:
The current structure of
Content
is:Given the text in the RFC, part of me thinks
Content
should be an enum akin to:Feels like this would help avoid inadvertently going against spec - but if I'm off my rocker please let me know.
The text was updated successfully, but these errors were encountered: