Skip to content

Creating Value::Blob without necessarily allocating heap #1475

Description

@bonsairobo

Right now, Value::Blob requires a Vec<u8>. I would like to be able to use it with [u8; N] for things like UUIDs. When combined with something like rarray, the number of heap allocations required to build an Array of Value::Blob gets quite high.

It should be possible to make Value generic over some B: AsRef<[u8]>. I understand this would be somewhat limited, as you still can't have more than one type of B when using Array or any other collection of Value<B>. But it would at least be more flexible than what we have now.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions