pub fn is_initialized(data: &[u8]) -> bool {
        if let Ok(header) = Header::unpack(data) {
            if let Ok(rec_size) = RefDB::get_record_size(data) {
                if header.counter > 0
                    && header.active_records as usize <= (data.len() - Header::LEN) / rec_size
                {
                    return true;
                }
            }
        }
        false
    }
/// Checks if data storage has been initialized.
/// It can return false positives if storage is not managed by RefDB.
Checks if data storage has been initialized.
It can return false positives if storage is not managed by RefDB.
Checks if data storage has been initialized . It can return false positives if storage is not managed by RefDB .
pub fn is_initialized(data: &[u8]) -> bool {
        if let Ok(header) = Header::unpack(data) {
            if let Ok(rec_size) = RefDB::get_record_size(data) {
                if header.counter > 0
                    && header.active_records as usize <= (data.len() - Header::LEN) / rec_size
                {
                    return true;
                }
            }
        }
        false
    }
pub fn is_initialized ( data : & [ u8 ] ) -> bool { if let Ok ( header ) = Header :: unpack ( data ) { if let Ok ( rec_size ) = RefDB :: get_record_size ( data ) { if header . counter > 0 && header . active_records as usize <= ( data . len ( ) - Header :: LEN ) / rec_size { return true ; } } } false }
Checks if data storage has been initialized.
Checks if data storage has been initialized .
data
&[u8]
data
&[u8]