Skip to content

Method to create from Buf #15

@kixelated

Description

@kixelated

A helper to create a BufList from a Buf would be nice, and would avoid allocating if the provided Buf is a BufList (or similar) with more than 1 chunk.

I think this is how you accomplish it today:

		let mut payload = BufList::new();
		while !buf.chunk().is_empty() {
			payload.push_chunk(buf.copy_to_bytes(buf.chunk().len()));
		}

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