Skip to content

ark-serialize support for boxed::Box and borrow::Cow #1007

@burdges

Description

@burdges

If we merely add T: ?Sized to Cow<'static,T> then I'd expect Cow<'static,[T]> should then serialzie exactly like [T], and hence like Vec<T>.

We want Cow<'static,[T]> to deserialize exactly like Vec<T>, which requires one new impl, but not sure if the orphan rules permit this, if an explict T: Sized helps, etc.

Box<T> could serialzie exactly like T, so then Box<[T]> would serialzie exactly like [T], and hence like Vec<T>.

Box<T> could deserialize exactly like T. As [T] has no deserializer, Box<[T]> could deserialize exactly like Vec<T>, no?

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