Skip to main content

try_copy

Function try_copy 

pub(crate) fn try_copy(bytes: &[u8]) -> Result<Vec<u8>, TryReserveError>
Available on crate feature alloc only.
Expand description

Copies bytes into a new Vec without panicking if the allocation fails.