// CAUTION: Note the unbound lifetime!!! This is only to factor out the null check;
//          the output is NOT valid for arbitrary lifetimes!
//          (so make sure to copy the output into an owned form ASAP)
Note the unbound lifetime!!. This is only to factor out the null check;
the output is NOT valid for arbitrary lifetimes.
(so make sure to copy the output into an owned form ASAP)
Note the unbound lifetime!! . This is only to factor out the null check ; the output is NOT valid for arbitrary lifetimes . ( so make sure to copy the output into an owned form ASAP )
unsafe fn __extract_compute_any_d<'unbound>(
        &mut self,
        name: &str,
        style: ComputeStyle,
        ty: ComputeType,
    ) -> FailResult<&'unbound c_double>
    {Ok({
        let style: c_int = style.into();
        let ty: c_int = ty.into();
        api_trace!(
            "lammps_extract_compute({:p}, {}, {}, {})",
            self.ptr, name, style, ty,
        );
        let out_ptr = with_temporary_c_str(name, |name| {
            unsafe { lammps_sys::lammps_extract_compute(self.ptr, name, style, ty)}
        }) as *mut c_double;
        // NOTE: Known cases where this produces Err:
        // * None so far.
        self.pop_error_as_result()?;
        // NOTE: Known cases where the pointer is NULL:
        // * (bug in lammps-wrap) Name provided does not belong to a compute.
        out_ptr.as_ref()
            .unwrap_or_else(|| panic!("Could not extract {:?}", name))
    })}
unsafe fn __extract_compute_any_d < ' unbound > ( & mut self , name : & str , style : ComputeStyle , ty : ComputeType , ) -> FailResult < & ' unbound c_double > { Ok ( { let style : c_int = style . into ( ) ; let ty : c_int = ty . into ( ) ; api_trace ! ( " " self ptr name style ty ) ; let out_ptr = with_temporary_c_str ( name , | name | { unsafe { lammps_sys :: lammps_extract_compute ( self . ptr , name , style , ty ) } } ) as * mut c_double ; // NOTE: Known cases where this produces Err: // * None so far. self . pop_error_as_result ( ) ? ; // NOTE: Known cases where the pointer is NULL: // * (bug in lammps-wrap) Name provided does not belong to a compute. out_ptr . as_ref ( ) . unwrap_or_else ( | | panic ! ( " " name ) ) } ) }
CAUTION: Note the unbound lifetime!!!
CAUTION : Note the unbound lifetime!!!
&mut self
name
&str
style
ComputeStyle
ty
ComputeType