#[non_exhaustive]pub struct RssGenerator {
pub title: String,
pub link: String,
pub description: String,
pub language: Option<String>,
pub copyright: Option<String>,
pub managing_editor: Option<String>,
pub webmaster: Option<String>,
}Expand description
Renders an RSS 2.0 feed.
§Examples
use molt::feed::{RssGenerator, RssItem};
let feed = RssGenerator::new("RideKeeper", "https://ridekeeper.example", "Release notes")
.language("pt-BR");
let xml = feed.generate(&[RssItem::new(
"1.2 — tyres & chain",
"https://ridekeeper.example/blog/1-2",
"Tyre pressure log",
"Tue, 11 Aug 2026 10:00:00 +0000",
)]);
assert!(xml.contains("<title>1.2 — tyres & chain</title>"));Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.title: StringThe channel title.
link: StringThe channel’s site URL.
description: StringWhat the channel is about.
language: Option<String>An RFC 5646 language tag.
copyright: Option<String>A copyright notice.
managing_editor: Option<String>The editorial contact address.
webmaster: Option<String>The technical contact address.
Renders as <webMaster>. The camelCase spelling is the RSS specification’s, not a
style slip. Do not “fix” it.
Implementations§
Source§impl RssGenerator
impl RssGenerator
Sourcepub fn new(
title: impl Into<String>,
link: impl Into<String>,
description: impl Into<String>,
) -> Self
pub fn new( title: impl Into<String>, link: impl Into<String>, description: impl Into<String>, ) -> Self
Creates a channel.
Sourcepub fn managing_editor(self, editor: impl Into<String>) -> Self
pub fn managing_editor(self, editor: impl Into<String>) -> Self
Sets the editorial contact.
Trait Implementations§
Source§impl Clone for RssGenerator
impl Clone for RssGenerator
Source§impl Debug for RssGenerator
impl Debug for RssGenerator
impl Eq for RssGenerator
Source§impl PartialEq for RssGenerator
impl PartialEq for RssGenerator
impl StructuralPartialEq for RssGenerator
Auto Trait Implementations§
impl Freeze for RssGenerator
impl RefUnwindSafe for RssGenerator
impl Send for RssGenerator
impl Sync for RssGenerator
impl Unpin for RssGenerator
impl UnsafeUnpin for RssGenerator
impl UnwindSafe for RssGenerator
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more