Skip to content

Relax Sized bound #2

Open
Open
@jalil-salame

Description

@jalil-salame

Currently there is a sized bound on T for all structs, I don't think it is necessary and it prevents me from defining a MaybeBoxed type based on this crate:

enum MaybeBoxed<'a, T> { // is actually a struct that provides this kind of interface
    Boxed { Ox<T> },
    Ref { &'a T },
}

This is great for zero copy deserialization where Cow<'a, T> is unnecessary because the structure itself does not provide &mut T or similar access (thus Cow<'a, T> is 24-bytes instead of 16-bytes on 64-buit systems).

I specifically want to be able to use ointers::NonNull<[T]> and ointers::NonNull<str> c:

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