pub struct Deprecated<T> { /* private fields */ }Expand description
Wrapper type that can be used inside the dispatch enum for a type to mark a version that has been deprecated.
For example:
use tfhe_versionable::deprecation::{Deprecable, Deprecated};
use tfhe_versionable::{Versionize, VersionsDispatch};
#[derive(Versionize)]
#[versionize(MyStructVersions)]
struct MyStruct;
impl Deprecable for MyStruct {
const TYPE_NAME: &'static str = "MyStruct";
const MIN_SUPPORTED_APP_VERSION: &'static str = "my_app v2";
}
#[derive(VersionsDispatch)]
#[allow(unused)]
pub enum MyStructVersions {
V0(Deprecated<MyStruct>),
V1(Deprecated<MyStruct>),
V2(MyStruct),
}Trait Implementations§
Source§impl<T: Deprecable> From<&Deprecated<T>> for DeprecatedVersion<T>
impl<T: Deprecable> From<&Deprecated<T>> for DeprecatedVersion<T>
Source§fn from(_value: &Deprecated<T>) -> Self
fn from(_value: &Deprecated<T>) -> Self
Converts to this type from the input type.
Source§impl<T: Deprecable> From<Deprecated<T>> for DeprecatedVersion<T>
impl<T: Deprecable> From<Deprecated<T>> for DeprecatedVersion<T>
Source§fn from(_value: Deprecated<T>) -> Self
fn from(_value: Deprecated<T>) -> Self
Converts to this type from the input type.
Source§impl<T: Deprecable> TryFrom<DeprecatedVersion<T>> for Deprecated<T>
impl<T: Deprecable> TryFrom<DeprecatedVersion<T>> for Deprecated<T>
Source§type Error = UnversionizeError
type Error = UnversionizeError
The type returned in the event of a conversion error.
Source§impl<T: Deprecable, U> Upgrade<U> for Deprecated<T>
impl<T: Deprecable, U> Upgrade<U> for Deprecated<T>
Source§impl<T: Deprecable> Version for Deprecated<T>
impl<T: Deprecable> Version for Deprecated<T>
type Ref<'vers> = DeprecatedVersion<T> where T: 'vers
type Owned = DeprecatedVersion<T>
Auto Trait Implementations§
impl<T> Freeze for Deprecated<T>
impl<T> RefUnwindSafe for Deprecated<T>where
T: RefUnwindSafe,
impl<T> Send for Deprecated<T>where
T: Send,
impl<T> Sync for Deprecated<T>where
T: Sync,
impl<T> Unpin for Deprecated<T>where
T: Unpin,
impl<T> UnwindSafe for Deprecated<T>where
T: 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