[][src]Function gvariant::casting::try_cast_slice_to_mut

pub fn try_cast_slice_to_mut<'a, T: AlignOf + AllBitPatternsValid>(
    s: &'a mut AlignedSlice<T::AlignOf>
) -> Result<&'a mut T, WrongSize>

Safely cast a &mut AlignedSlice to &mut T where T: Sized

If the length of the input slice isn't exactly the size of T this function will return Err(WrongSize).