pub fn read_if_changed(
        data: &[u8],
        name: &ArrayString64,
        last_counter: usize,
    ) -> Result<Option<Record>, ProgramError> {
        if let Some(index) = RefDB::find_index(data, name)? {
            RefDB::read_at_if_changed(data, index, last_counter)
        } else {
            Ok(None)
        }
    }
/// Returns the record only if it has been updated
Returns the record only if it has been updated
Returns the record only if it has been updated
pub fn read_if_changed(
        data: &[u8],
        name: &ArrayString64,
        last_counter: usize,
    ) -> Result<Option<Record>, ProgramError> {
        if let Some(index) = RefDB::find_index(data, name)? {
            RefDB::read_at_if_changed(data, index, last_counter)
        } else {
            Ok(None)
        }
    }
pub fn read_if_changed ( data : & [ u8 ] , name : & ArrayString64 , last_counter : usize , ) -> Result < Option < Record > , ProgramError > { if let Some ( index ) = RefDB :: find_index ( data , name ) ? { RefDB :: read_at_if_changed ( data , index , last_counter ) } else { Ok ( None ) } }
Returns the record only if it has been updated
Returns the record only if it has been updated
data
&[u8]
name
&ArrayString64
last_counter
usize
data
&[u8]
name
&ArrayString64
last_counter
usize