Version

Trait Version 

Source
pub trait Version: Sized {
    type Ref<'vers>: From<&'vers Self> + Serialize
       where Self: 'vers;
    type Owned: From<Self> + TryInto<Self, Error = UnversionizeError> + DeserializeOwned + Serialize;
}
Expand description

This trait is used to mark a specific version of a given type

Required Associated Types§

Source

type Ref<'vers>: From<&'vers Self> + Serialize where Self: 'vers

Source

type Owned: From<Self> + TryInto<Self, Error = UnversionizeError> + DeserializeOwned + Serialize

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<T: Deprecable> Version for Deprecated<T>

Source§

type Ref<'vers> = DeprecatedVersion<T> where T: 'vers

Source§

type Owned = DeprecatedVersion<T>