Skip to content

Consider emphasizing storability #14

Open
@CosmicHorrorDev

Description

@CosmicHorrorDev

CachePolicy::is_storable() is pretty easy to overlook for upholding a MUST NOT guarantee. Maybe it would be a better idea to force it into an explicit action by making constructing a CachePolicy fallible that way consumers who are only interested in storable policies can just ignore the Err case. Something like

pub struct NotStorable(pub CachePolicy);

impl CachePolicy {
    pub fn new(...) -> Result<Self, NotStorable> { ... }
    pub fn new_options(...) -> Result<Self, NotStorable> { ... }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions