atomb

Atom feeds! See the RFC for details: https://www.ietf.org/rfc/rfc4287.txt

Types

pub type Category {
  Category(
    term: String,
    scheme: Option(String),
    label: Option(String),
  )
}

Constructors

  • Category(
      term: String,
      scheme: Option(String),
      label: Option(String),
    )
pub type Content {
  InlineText(media_type: TextMediaType, content: String)
  OutOfLine(media_type: String, src_uri: String)
}

Constructors

  • InlineText(media_type: TextMediaType, content: String)
  • OutOfLine(media_type: String, src_uri: String)

    Arguments

    media_type

    Must be in the format /, e.g. text/json

pub type Entry {
  Entry(
    id: String,
    title: String,
    updated: Timestamp,
    content: Option(Content),
    summary: Option(TextContent),
    categories: List(Category),
    links: List(Link),
    authors: List(Person),
    contributors: List(Person),
    published: Option(Timestamp),
    rights: Option(String),
  )
}

Constructors

  • Entry(
      id: String,
      title: String,
      updated: Timestamp,
      content: Option(Content),
      summary: Option(TextContent),
      categories: List(Category),
      links: List(Link),
      authors: List(Person),
      contributors: List(Person),
      published: Option(Timestamp),
      rights: Option(String),
    )

    Arguments

    content

    Must be present if there is no link with a rel attribute of alternate.

    authors

    At least 1 author must be present if the feed does not have an author.

The “atom:feed” element is the document (i.e., top-level) element of an Atom Feed Document, acting as a container for metadata and data associated with the feed. Its element children consist of metadata elements followed by zero or more atom:entry child elements.

pub type Feed {
  Feed(
    title: String,
    id: String,
    updated: Timestamp,
    subtitle: Option(TextContent),
    rights: Option(TextContent),
    icon: Option(String),
    logo: Option(String),
    authors: List(Person),
    links: List(Link),
    categories: List(Category),
    contributors: List(Person),
    generator: Option(Generator),
    entries: List(Entry),
  )
}

Constructors

  • Feed(
      title: String,
      id: String,
      updated: Timestamp,
      subtitle: Option(TextContent),
      rights: Option(TextContent),
      icon: Option(String),
      logo: Option(String),
      authors: List(Person),
      links: List(Link),
      categories: List(Category),
      contributors: List(Person),
      generator: Option(Generator),
      entries: List(Entry),
    )
pub type Generator {
  Generator(
    text: String,
    uri: Option(String),
    version: Option(String),
  )
}

Constructors

  • Generator(
      text: String,
      uri: Option(String),
      version: Option(String),
    )
pub type Link {
  Link(href: String, rel: Option(String))
}

Constructors

  • Link(href: String, rel: Option(String))
pub type Person {
  Person(
    name: String,
    uri: Option(String),
    email: Option(String),
  )
}

Constructors

  • Person(name: String, uri: Option(String), email: Option(String))
pub type TextContent {
  TextContent(media_type: TextMediaType, content: String)
}

Constructors

  • TextContent(media_type: TextMediaType, content: String)
pub type TextMediaType {
  Text
  Html
  Xhtml
}

Constructors

  • Text
  • Html
  • Xhtml

Functions

pub fn render(feed: Feed) -> StringTree
Search Document