Sign in

    joanna/moonfeed/src/rss does not have a README file

    ParseError

    pub(all) suberror ParseError {
    InvalidXml(String)
    UnsupportedRssVersion(String)
    MissingChannel
    MissingChannelTitle
    MissingChannelLink
    MissingChannelDescription
    InvalidEnclosure(String, String)
    InvalidRequiredField(String, String)
    } derive(Eq,
    Debug
    )

    RSS errors carry a field path, or an XML location from the underlying reader.

    ParseError::equal

    fn ParseError::equal(self : ParseError, other : ParseError) -> Bool

    ParseError::not_equal

    fn ParseError::not_equal(self : ParseError, other : ParseError) -> Bool

    ParseError::to_repr

    Category

    pub(all) struct Category {
    value : String
    domain : String?
    }

    Channel

    pub(all) struct Channel {
    title : String
    link : String
    description : String
    language : String?
    pub_date : String?
    last_build_date : String?
    managing_editor : String?
    web_master : String?
    categories : Array[Category]
    generator : String?
    docs : String?
    ttl : UInt64?
    image : Image?
    items : Array[Item]
    }

    Lossless representation of the supported RSS core fields.

    Enclosure

    pub(all) struct Enclosure {
    url : String
    mime_type : String
    length : UInt64
    }

    Guid

    pub(all) struct Guid {
    value : String
    is_permalink : Bool
    }

    Image

    pub(all) struct Image {
    url : String
    title : String
    link : String
    width : UInt64?
    height : UInt64?
    description : String?
    }

    Item

    pub(all) struct Item {
    title : String?
    link : String?
    description : String?
    author : String?
    categories : Array[Category]
    comments : String?
    enclosure : Enclosure?
    guid : Guid?
    pub_date : String?
    source : Source?
    }

    RSS-specific metadata retained before normalization; dates stay as source strings.

    Source

    pub(all) struct Source {
    title : String
    url : String
    }

    normalize

    fn normalize(channel : Channel) ->
    Feed
    raise ParseError

    Convert an RSS 2.0 channel to the shared Feed model. RSS descriptions are retained as both the item summary and HTML content because RSS does not declare whether description text contains markup.

    parse

    fn parse(input : String) ->
    Feed
    raise ParseError

    Parse and normalize an RSS 2.0 document in one operation.

    parse_raw

    fn parse_raw(input : String) -> Channel raise ParseError

    Parse RSS 2.0 core fields while preserving metadata not represented by Feed.

    Powered by MoonBit

    Site sourceReport issuePackagesBuild queueSkillsStatistics

    © 2026 mooncakes.io