Struct rental::MapMut [] [src]

pub struct MapMut;

A mapper that can convert one rental into another, provided they have identical owner types.

Methods

impl MapMut
[src]

Maps from one rental to another. The closure assumes ownership of the rented value and converts it into a new value. A new rental pair is then returned to you from the original owner and the new value. As with other rental closures, the 'rental lifetime is existential to prevent improper escaping or replacement.

As map, but the closure may fail. In addition to the error value, the closure must also return the rented value in the tuple, so that the original rented pair can be reconstituted and given back to you in the error tuple returned by this method.