/// Reads a scalar dataset/attribute.
Reads a scalar dataset/attribute.
Reads a scalar dataset / attribute .
pub fn read_scalar<T: H5Type>(&self) -> Result<T> {
        let obj_ndim = self.obj.get_shape()?.ndim();
        ensure!(obj_ndim == 0, "ndim mismatch: expected scalar, got {}", obj_ndim);
        let mut val = mem::MaybeUninit::<T>::uninit();
        self.read_into_buf(val.as_mut_ptr(), None, None).map(|_| unsafe { val.assume_init() })
    }
pub fn read_scalar < T : H5Type > ( & self ) -> Result < T > { let obj_ndim = self . obj . get_shape ( ) ? . ndim ( ) ; ensure ! ( obj_ndim 0 " " obj_ndim ) ; let mut val = mem :: MaybeUninit :: < T > :: uninit ( ) ; self . read_into_buf ( val . as_mut_ptr ( ) , None , None ) . map ( | _ | unsafe { val . assume_init ( ) } ) }
Reads a scalar dataset/attribute.
Reads a scalar dataset / attribute .
&self