Skip to content

Why Value is pub while its bound Sealed is sealed? #1454

@tisonkun

Description

@tisonkun
pub trait Value: crate::sealed::Sealed {
    /// Visits this value with the given `Visitor`.
    fn record(&self, key: &Field, visitor: &mut dyn Visit);
}

mod sealed {
    pub trait Sealed {}
}

I don't see a solution to implement Value in application code. I can see that it is possible using DebugValue or other out-of-the-box implementation for boxing the value, but why Value is pub while its bound Sealed is sealed?

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