pub struct Upgrade<Latest, Prior, Err>where
Err: Error,
Prior: Versioned<Err>,
Latest: Versioned<Err>,
Latest::Output: TryFrom<Prior::Output>,{ /* private fields */ }Expand description
The Upgrade struct is used to upgrade data from a previous version to the latest version.
Prior::VERSION must be less than Latest::VERSION!
Upgrades can be chained!
Trait Implementations§
Source§impl<Latest, Prior, Dec, Err> Decodable<Dec, Err> for Upgrade<Latest, Prior, Err>
impl<Latest, Prior, Dec, Err> Decodable<Dec, Err> for Upgrade<Latest, Prior, Err>
Source§fn decode_with_version(
decoder: &mut Dec,
version: u32,
) -> Result<Self::Output, Err>
fn decode_with_version( decoder: &mut Dec, version: u32, ) -> Result<Self::Output, Err>
Decodes the data with a provided version tag. Is helpful for use in combination with
Upgrade. Read moreAuto Trait Implementations§
impl<Latest, Prior, Err> Freeze for Upgrade<Latest, Prior, Err>
impl<Latest, Prior, Err> RefUnwindSafe for Upgrade<Latest, Prior, Err>where
<Latest as Versioned<Err>>::Output: Sized,
Prior: RefUnwindSafe,
Latest: RefUnwindSafe,
Err: RefUnwindSafe,
impl<Latest, Prior, Err> Send for Upgrade<Latest, Prior, Err>
impl<Latest, Prior, Err> Sync for Upgrade<Latest, Prior, Err>
impl<Latest, Prior, Err> Unpin for Upgrade<Latest, Prior, Err>
impl<Latest, Prior, Err> UnwindSafe for Upgrade<Latest, Prior, Err>where
<Latest as Versioned<Err>>::Output: Sized,
Prior: UnwindSafe,
Latest: UnwindSafe,
Err: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more