pub fn delete(&mut self, uuid: &UniqueId) -> Result<(), Error> {
        self.records.remove(uuid);

        let rec: DeletableRecord<T> = DeletableRecord {
            id: uuid.clone(),
            data: None,
        };
        match serde_json::to_string(&rec) {
            Ok(rec_str) => self
                .writer
                .write_fmt(format_args!("{}\n", rec_str.as_str()))
                .map_err(Error::IOError),
            Err(err) => Err(Error::JSONStringError(err)),
        }
    }
/// Delete a record from the database
///
/// Future note: while this deletes a record from the view, it only adds an entry to the
/// database that indicates `data: null`. If record histories ever become important, the record
/// and its entire history (including this delete) will still be available.
Delete a record from the database
Future note: while this deletes a record from the view, it only adds an entry to the
database that indicates `data: null`. If record histories ever become important, the record
and its entire history (including this delete) will still be available.
Delete a record from the database Future note : while this deletes a record from the view it only adds an entry to the database that indicates ` data : null ` . If record histories ever become important the record and its entire history ( including this delete ) will still be available .
pub fn delete(&mut self, uuid: &UniqueId) -> Result<(), Error> {
        self.records.remove(uuid);
        let rec: DeletableRecord<T> = DeletableRecord {
            id: uuid.clone(),
            data: None,
        };
        match serde_json::to_string(&rec) {
            Ok(rec_str) => self
                .writer
                .write_fmt(format_args!("{}\n", rec_str.as_str()))
                .map_err(Error::IOError),
            Err(err) => Err(Error::JSONStringError(err)),
        }
    }
pub fn delete ( & mut self , uuid : & UniqueId ) -> Result < ( ) , Error > { self . records . remove ( uuid ) ; let rec : DeletableRecord < T > = DeletableRecord { id : uuid . clone ( ) , data : None , } ; match serde_json :: to_string ( & rec ) { Ok ( rec_str ) => self . writer . write_fmt ( format_args ! ( " \n " rec_str as_str ( ) ) ) . map_err ( Error :: IOError ) , Err ( err ) => Err ( Error :: JSONStringError ( err ) ) , } }
Delete a record from the database
Future note: while this deletes a record from the view, it only adds an entry to the
database that indicates `data: null`.
Delete a record from the database Future note : while this deletes a record from the view it only adds an entry to the database that indicates ` data : null ` .
&mut self
uuid
&UniqueId
&mut self
uuid
&UniqueId