Skip to content

Parse, don't validate #182

@expenses

Description

@expenses

Hi, I really appreciate this crate and like how it's laid out. One change I'd like is to be able to get out the parsed values of things like channels, which are currently just thrown away in the fn validate(&self) -> Result<(), ValidationError> functions. This would change things from being validation functions to parsing functions following parse, don't validate.

struct ParsedChannel {
    link: Url,
    docs: Option<Url>,
    last_build_date: Option<DateTime>,
    ...
}

impl Parse for Channel {
    type Parsed = ParsedChannel;

    fn parse(&self) -> Result<Self::Parsed, ParseError> {
        ...
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions