[−][src]Function gvariant::casting::try_cast_slice_to
pub fn try_cast_slice_to<'a, T: AlignOf + AllBitPatternsValid>(
s: &'a AlignedSlice<T::AlignOf>
) -> Result<&'a T, WrongSize>
Safely cast an &AlignedSlice
to &T
where T: Sized
If the length of the input slice isn't exactly the size of T
this function
will return Err(WrongSize)
.