/// Tries to create a `NetworkKey` reference from a byte slice.
Tries to create a `NetworkKey` reference from a byte slice.
Tries to create a ` NetworkKey ` reference from a byte slice .
pub fn try_ref_from_slice(slice: &[u8]) -> Result<&NetworkKey, ot::WrongSize> {
        if slice.len() == OT_NETWORK_KEY_SIZE as usize {
            Ok(unsafe { Self::ref_from_ot_ptr((slice as *const [u8]) as *const otNetworkKey) }
                .unwrap())
        } else {
            Err(ot::WrongSize)
        }
    }
pub fn try_ref_from_slice ( slice : & [ u8 ] ) -> Result < & NetworkKey , ot :: WrongSize > { if slice . len ( ) == OT_NETWORK_KEY_SIZE as usize { Ok ( unsafe { Self :: ref_from_ot_ptr ( ( slice as * const [ u8 ] ) as * const otNetworkKey ) } . unwrap ( ) ) } else { Err ( ot :: WrongSize ) } }
Tries to create a `NetworkKey` reference from a byte slice.
Tries to create a ` NetworkKey ` reference from a byte slice .
slice
&[u8]