[−][src]Struct versionize::version_map::VersionMap
The VersionMap API provides functionality to define the version for each type and attach them to specific root versions.
Implementations
impl VersionMap
[src]
pub fn new() -> Self
[src]
Create a new version map initialized at version 1.
pub fn new_version(&mut self) -> &mut Self
[src]
Bumps root version by 1 to create a new root version.
pub fn set_type_version(
&mut self,
type_id: TypeId,
type_version: u16
) -> &mut Self
[src]
&mut self,
type_id: TypeId,
type_version: u16
) -> &mut Self
Define a mapping between a specific type version and the latest root version.
pub fn get_type_version(&self, root_version: u16, type_id: TypeId) -> u16
[src]
Returns the version of type_id
corresponding to the specified root_version
.
If root_version
is out of range returns the version of type_id
at latest version.
pub fn latest_version(&self) -> u16
[src]
Returns the latest version.
Trait Implementations
impl Clone for VersionMap
[src]
pub fn clone(&self) -> VersionMap
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for VersionMap
[src]
impl Default for VersionMap
[src]
pub fn default() -> VersionMap
[src]
Auto Trait Implementations
impl RefUnwindSafe for VersionMap
[src]
impl Send for VersionMap
[src]
impl Sync for VersionMap
[src]
impl Unpin for VersionMap
[src]
impl UnwindSafe for VersionMap
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,