webls/atom

Types

pub type AtomEntry {
  AtomEntry(
    id: String,
    title: Text,
    updated: Time,
    authors: List(Person),
    content: Option(Text),
    link: Option(Link),
    summary: Option(Text),
    categories: List(Category),
    contributors: List(Person),
    published: Option(Time),
    rights: Option(Text),
    source: Option(Source),
  )
}

Constructors

  • AtomEntry(
      id: String,
      title: Text,
      updated: Time,
      authors: List(Person),
      content: Option(Text),
      link: Option(Link),
      summary: Option(Text),
      categories: List(Category),
      contributors: List(Person),
      published: Option(Time),
      rights: Option(Text),
      source: Option(Source),
    )
pub type AtomFeed {
  AtomFeed(
    id: String,
    title: Text,
    updated: Time,
    authors: List(Person),
    link: Option(Link),
    categories: List(Category),
    contributors: List(Person),
    generator: Option(Generator),
    icon: Option(String),
    logo: Option(String),
    rights: Option(Text),
    subtitle: Option(String),
    entries: List(AtomEntry),
  )
}

Constructors

  • AtomFeed(
      id: String,
      title: Text,
      updated: Time,
      authors: List(Person),
      link: Option(Link),
      categories: List(Category),
      contributors: List(Person),
      generator: Option(Generator),
      icon: Option(String),
      logo: Option(String),
      rights: Option(Text),
      subtitle: Option(String),
      entries: List(AtomEntry),
    )
pub type Category {
  Category(
    term: String,
    scheme: Option(String),
    label: Option(String),
  )
}

Constructors

  • Category(
      term: String,
      scheme: Option(String),
      label: Option(String),
    )
pub type Generator {
  Generator(uri: Option(String), version: Option(String))
}

Constructors

  • Generator(uri: Option(String), version: Option(String))
pub type Link {
  Link(
    href: String,
    rel: Option(String),
    content_type: Option(String),
    hreflang: Option(String),
    title: Option(String),
    length: Option(Int),
  )
}

Constructors

  • Link(
      href: String,
      rel: Option(String),
      content_type: Option(String),
      hreflang: Option(String),
      title: Option(String),
      length: Option(Int),
    )
pub type Person {
  Person(
    name: String,
    email: Option(String),
    uri: Option(String),
  )
}

Constructors

  • Person(name: String, email: Option(String), uri: Option(String))
pub type Source {
  Source(id: String, title: String, updated: Time)
}

Constructors

  • Source(id: String, title: String, updated: Time)
pub type Text {
  PlainText(value: String)
  Html(value: String)
  XHtml(value: String)
}

Constructors

  • PlainText(value: String)
  • Html(value: String)
  • XHtml(value: String)

Functions

pub fn category(term: String) -> Category
pub fn entry(id: String, title: Text, updated: Time) -> AtomEntry
pub fn feed(id: String, title: Text, updated: Time) -> AtomFeed
pub fn html(input: String) -> Text
pub fn link(href: String) -> Link
pub fn person(name: String) -> Person
pub fn plain_text(input: String) -> Text
pub fn to_string(feed: AtomFeed) -> String

Converts an Atom feed to a string of a valid Atom 1.0 feed

pub fn with_category_label(
  category: Category,
  label: String,
) -> Category
pub fn with_category_scheme(
  category: Category,
  scheme: String,
) -> Category
pub fn with_entry_authors(
  entry: AtomEntry,
  authors: List(Person),
) -> AtomEntry
pub fn with_entry_categories(
  entry: AtomEntry,
  categories: List(Category),
) -> AtomEntry
pub fn with_entry_content(
  entry: AtomEntry,
  content: Text,
) -> AtomEntry
pub fn with_entry_contributors(
  entry: AtomEntry,
  contributors: List(Person),
) -> AtomEntry
pub fn with_entry_id(entry: AtomEntry, id: String) -> AtomEntry
pub fn with_entry_link(entry: AtomEntry, link: Link) -> AtomEntry
pub fn with_entry_published(
  entry: AtomEntry,
  published: Time,
) -> AtomEntry
pub fn with_entry_rights(
  entry: AtomEntry,
  rights: Text,
) -> AtomEntry
pub fn with_entry_source(
  entry: AtomEntry,
  source: Source,
) -> AtomEntry
pub fn with_entry_summary(
  entry: AtomEntry,
  summary: Text,
) -> AtomEntry
pub fn with_entry_title(
  entry: AtomEntry,
  title: Text,
) -> AtomEntry
pub fn with_entry_updated(
  entry: AtomEntry,
  updated: Time,
) -> AtomEntry
pub fn with_feed_author(
  feed: AtomFeed,
  author: Person,
) -> AtomFeed
pub fn with_feed_authors(
  feed: AtomFeed,
  authors: List(Person),
) -> AtomFeed
pub fn with_feed_categories(
  feed: AtomFeed,
  categories: List(Category),
) -> AtomFeed
pub fn with_feed_category(
  feed: AtomFeed,
  category: Category,
) -> AtomFeed
pub fn with_feed_contributor(
  feed: AtomFeed,
  contributor: Person,
) -> AtomFeed
pub fn with_feed_contributors(
  feed: AtomFeed,
  contributors: List(Person),
) -> AtomFeed
pub fn with_feed_entries(
  feed: AtomFeed,
  entries: List(AtomEntry),
) -> AtomFeed
pub fn with_feed_entry(
  feed: AtomFeed,
  entry: AtomEntry,
) -> AtomFeed
pub fn with_feed_generator(
  feed: AtomFeed,
  generator: Generator,
) -> AtomFeed
pub fn with_feed_icon(feed: AtomFeed, icon: String) -> AtomFeed
pub fn with_feed_link(feed: AtomFeed, link: Link) -> AtomFeed
pub fn with_feed_logo(feed: AtomFeed, logo: String) -> AtomFeed
pub fn with_feed_rights(feed: AtomFeed, rights: Text) -> AtomFeed
pub fn with_feed_subtitle(
  feed: AtomFeed,
  subtitle: String,
) -> AtomFeed
pub fn with_link_content_type(
  link: Link,
  content_type: String,
) -> Link
pub fn with_link_hreflang(link: Link, hreflang: String) -> Link
pub fn with_link_length(link: Link, length: Int) -> Link
pub fn with_link_rel(link: Link, rel: String) -> Link
pub fn with_link_title(link: Link, title: String) -> Link
pub fn with_person_email(person: Person, email: String) -> Person
pub fn with_person_uri(person: Person, uri: String) -> Person
pub fn xhtml(input: String) -> Text
Search Document