fn unsafe_try_into<T, I>(value: *const I, field_name: &'static str) -> Result<T>
where
    I: Clone,
    I: TryInto<T, Error = Error>,
{
    if value.is_null() {
        Err(Error::FFIPtrNullButRequired(field_name))
    } else {
        let value: T = unsafe { (*value).clone().try_into()? };
        Ok(value)
    }
}
/// Helper to call TryInto::try_into on a *const ptr of our rust type implementing it.
/// This is used for
Helper to call TryInto::try_into on a *const ptr of our rust type implementing it.
This is used for
Helper to call TryInto :: try_into on a * const ptr of our rust type implementing it . This is used for
fn unsafe_try_into<T, I>(value: *const I, field_name: &'static str) -> Result<T>
where
    I: Clone,
    I: TryInto<T, Error = Error>,
{
    if value.is_null() {
        Err(Error::FFIPtrNullButRequired(field_name))
    } else {
        let value: T = unsafe { (*value).clone().try_into()? };
        Ok(value)
    }
}
fn unsafe_try_into < T , I > ( value : * const I , field_name : & ' static str ) -> Result < T > where I : Clone , I : TryInto < T , Error = Error > , { if value . is_null ( ) { Err ( Error :: FFIPtrNullButRequired ( field_name ) ) } else { let value : T = unsafe { ( * value ) . clone ( ) . try_into ( ) ? } ; Ok ( value ) } }
Helper to call TryInto::try_into on a *const ptr of our rust type implementing it.
Helper to call TryInto :: try_into on a * const ptr of our rust type implementing it .
value
*const I
field_name
&'static str
value
*const I
field_name
&'static str