Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

- Remove ambiguous statements about escaping from documentation. [`#85`](https://github.com/rust-syndication/atom/pull/85)
- Update `quick-xml` to `0.37`. [`#86`](https://github.com/rust-syndication/atom/pull/86)
- Clarify usage of `src` attribute of a `Content` structure. [`#87`](https://github.com/rust-syndication/atom/pull/87)

## 0.12.4 - 2024-08-28

Expand Down
11 changes: 11 additions & 0 deletions src/content.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,17 @@ use crate::toxml::ToXml;
use crate::util::{atom_text, atom_xhtml, attr_value, decode};

/// Represents the content of an Atom entry
//
/// ## Attention
///
/// Atom format specification [RFC4287](https://datatracker.ietf.org/doc/html/rfc4287#section-4.1.3.2)
/// states that `src` and `value` (content) fields are mutually exclusive:
///
/// > atom:content MAY have a "src" attribute, whose value MUST be an IRI reference.
/// > If the "src" attribute is present, atom:content MUST be empty.
///
/// Setting of both fields when authoring an Atom feed is still technically possible,
/// but it will lead to a non-compliant result.
#[cfg_attr(feature = "serde", derive(Deserialize, Serialize))]
#[derive(Debug, Default, Clone, PartialEq)]
#[cfg_attr(feature = "builders", derive(Builder))]
Expand Down