Skip to main content

drop_owned_bytes

Function drop_owned_bytes 

Source
pub unsafe extern "C" fn drop_owned_bytes(
    ptr: *mut u8,
    len: usize,
    cap: usize,
)
Expand description

Default drop_fn used by OwnedBytes::from_vec. Plug-ins that build OwnedBytes via from_vec get matching free behaviour automatically.

ยงSafety

The caller must pass ptr, len, and cap originally returned by a Vec<u8> that was leaked via from_vec.