How to convert Vec to bytes::Bytes without new allocation and copy?

⚓ Rust    📅 2026-06-18    👤 surdeus    👁️ 1      

surdeus

Currently Bytes only implements From<Vec<u8>>, and bytemuck doesn't provide conversion from Vec<T> of arbitrary alignment to Vec<u8>.

5 posts - 3 participants

Read full topic

🏷️ Rust_feed