pub fn update<A>(&mut self, action: A) -> StdResult<T>
    where
        A: FnOnce(T) -> StdResult<T>,
    {
        let input = self.load()?;
        let output = action(input)?;
        self.save(&output)?;
        Ok(output)
    }
/// update will load the data, perform the specified action, and store the result
/// in the database. This is shorthand for some common sequences, which may be useful
///
/// This is the least stable of the APIs, and definitely needs some usage
update will load the data, perform the specified action, and store the result
in the database. This is shorthand for some common sequences, which may be useful

This is the least stable of the APIs, and definitely needs some usage
update will load the data perform the specified action and store the result in the database . This is shorthand for some common sequences which may be useful This is the least stable of the APIs and definitely needs some usage
pub fn update<A>(&mut self, action: A) -> StdResult<T>
    where
        A: FnOnce(T) -> StdResult<T>,
    {
        let input = self.load()?;
        let output = action(input)?;
        self.save(&output)?;
        Ok(output)
    }
pub fn update < A > ( & mut self , action : A ) -> StdResult < T > where A : FnOnce ( T ) -> StdResult < T > , { let input = self . load ( ) ? ; let output = action ( input ) ? ; self . save ( & output ) ? ; Ok ( output ) }
update will load the data, perform the specified action, and store the result
in the database.
update will load the data perform the specified action and store the result in the database .
&mut self
action
A
&mut self
action
A