rustc_data_structures::owned_slice

Function try_slice_owned

source
pub fn try_slice_owned<O, F, E>(owner: O, slicer: F) -> Result<OwnedSlice, E>
where O: Send + Sync + 'static, F: FnOnce(&O) -> Result<&[u8], E>,
Expand description

Makes an OwnedSlice out of an owner and a slicer function that can fail.

See slice_owned for the infallible version.