webls/atom
Types
pub type AtomEntry {
AtomEntry(
id: String,
title: Text,
updated: timestamp.Timestamp,
authors: List(Person),
content: option.Option(Text),
link: option.Option(Link),
summary: option.Option(Text),
categories: List(Category),
contributors: List(Person),
published: option.Option(timestamp.Timestamp),
rights: option.Option(Text),
source: option.Option(Source),
)
}
Constructors
-
AtomEntry( id: String, title: Text, updated: timestamp.Timestamp, authors: List(Person), content: option.Option(Text), link: option.Option(Link), summary: option.Option(Text), categories: List(Category), contributors: List(Person), published: option.Option(timestamp.Timestamp), rights: option.Option(Text), source: option.Option(Source), )
pub type AtomFeed {
AtomFeed(
id: String,
title: Text,
updated: timestamp.Timestamp,
authors: List(Person),
link: option.Option(Link),
categories: List(Category),
contributors: List(Person),
generator: option.Option(Generator),
icon: option.Option(String),
logo: option.Option(String),
rights: option.Option(Text),
subtitle: option.Option(String),
entries: List(AtomEntry),
)
}
Constructors
-
AtomFeed( id: String, title: Text, updated: timestamp.Timestamp, authors: List(Person), link: option.Option(Link), categories: List(Category), contributors: List(Person), generator: option.Option(Generator), icon: option.Option(String), logo: option.Option(String), rights: option.Option(Text), subtitle: option.Option(String), entries: List(AtomEntry), )
pub type Category {
Category(
term: String,
scheme: option.Option(String),
label: option.Option(String),
)
}
Constructors
-
Category( term: String, scheme: option.Option(String), label: option.Option(String), )
pub type Generator {
Generator(
uri: option.Option(String),
version: option.Option(String),
)
}
Constructors
-
Generator( uri: option.Option(String), version: option.Option(String), )
pub type Link {
Link(
href: String,
rel: option.Option(String),
content_type: option.Option(String),
hreflang: option.Option(String),
title: option.Option(String),
length: option.Option(Int),
)
}
Constructors
-
Link( href: String, rel: option.Option(String), content_type: option.Option(String), hreflang: option.Option(String), title: option.Option(String), length: option.Option(Int), )
pub type Person {
Person(
name: String,
email: option.Option(String),
uri: option.Option(String),
)
}
Constructors
-
Person( name: String, email: option.Option(String), uri: option.Option(String), )
pub type Source {
Source(id: String, title: String, updated: timestamp.Timestamp)
}
Constructors
-
Source(id: String, title: String, updated: timestamp.Timestamp)
Values
pub fn entry(
id: String,
title: Text,
updated: timestamp.Timestamp,
) -> AtomEntry
pub fn feed(
id: String,
title: Text,
updated: timestamp.Timestamp,
) -> AtomFeed
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_entry_published(
entry: AtomEntry,
published: timestamp.Timestamp,
) -> AtomEntry
pub fn with_entry_updated(
entry: AtomEntry,
updated: timestamp.Timestamp,
) -> AtomEntry