pub fn update(
        data: &mut [u8],
        name: &ArrayString64,
        reference: &Reference,
    ) -> Result<usize, ProgramError> {
        if let Some(index) = RefDB::find_index(data, name)? {
            RefDB::update_at(data, index, reference)
        } else {
            Err(ProgramError::Custom(404))
        }
    }
/// Updates the reference value in the storage for the record with the given name.
/// It doesn't validate storage type, counter or name. Should be used only if
/// record is active (i.e. to update existing record), you are certain that
/// the storage and index are correct, and you don't care if the record was
/// updated since last read time.
Updates the reference value in the storage for the record with the given name.
It doesn't validate storage type, counter or name. Should be used only if
record is active , you are certain that
the storage and index are correct, and you don't care if the record was
updated since last read time.
Updates the reference value in the storage for the record with the given name . It doesn ' t validate storage type counter or name . Should be used only if record is active you are certain that the storage and index are correct and you don ' t care if the record was updated since last read time .
pub fn update(
        data: &mut [u8],
        name: &ArrayString64,
        reference: &Reference,
    ) -> Result<usize, ProgramError> {
        if let Some(index) = RefDB::find_index(data, name)? {
            RefDB::update_at(data, index, reference)
        } else {
            Err(ProgramError::Custom(404))
        }
    }
pub fn update ( data : & mut [ u8 ] , name : & ArrayString64 , reference : & Reference , ) -> Result < usize , ProgramError > { if let Some ( index ) = RefDB :: find_index ( data , name ) ? { RefDB :: update_at ( data , index , reference ) } else { Err ( ProgramError :: Custom ( 404 ) ) } }
Updates the reference value in the storage for the record with the given name.
Updates the reference value in the storage for the record with the given name .
data
&mut [u8]
name
&ArrayString64
reference
&Reference
data
&mut [u8]
name
&ArrayString64
reference
&Reference