pub struct Removed<T> { /* private fields */ }
Expand description
Helper struct which represents a field which has been removed.
In contrast to AbiRemoved, this type only supports deserialization. It is thus not recommended for use when SavefileAbi is to be used, and forward compatibility is desired.
The difference is that Removed does not require T to implement Default, or any other factory trait, since we never need to serialize dummy values of Removed (we never serialize using a schema where a field i Removed).
Implementations§
Trait Implementations§
Source§impl<T: WithSchema + Deserialize> Deserialize for Removed<T>
impl<T: WithSchema + Deserialize> Deserialize for Removed<T>
Source§fn deserialize(
deserializer: &mut Deserializer<'_, impl Read>,
) -> Result<Self, SavefileError>
fn deserialize( deserializer: &mut Deserializer<'_, impl Read>, ) -> Result<Self, SavefileError>
Source§impl<T: Introspect> Introspect for Removed<T>
impl<T: Introspect> Introspect for Removed<T>
Source§fn introspect_value(&self) -> String
fn introspect_value(&self) -> String
Source§fn introspect_child(
&self,
_index: usize,
) -> Option<Box<dyn IntrospectItem<'_> + '_>>
fn introspect_child( &self, _index: usize, ) -> Option<Box<dyn IntrospectItem<'_> + '_>>
Source§fn introspect_len(&self) -> usize
fn introspect_len(&self) -> usize
Source§impl<T: Ord> Ord for Removed<T>
impl<T: Ord> Ord for Removed<T>
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl<T> Packed for Removed<T>
impl<T> Packed for Removed<T>
Source§unsafe fn repr_c_optimization_safe(_version: u32) -> IsPacked
unsafe fn repr_c_optimization_safe(_version: u32) -> IsPacked
Source§impl<T: PartialOrd> PartialOrd for Removed<T>
impl<T: PartialOrd> PartialOrd for Removed<T>
Source§impl<T: WithSchema> Serialize for Removed<T>
impl<T: WithSchema> Serialize for Removed<T>
Source§fn serialize(
&self,
_serializer: &mut Serializer<'_, impl Write>,
) -> Result<(), SavefileError>
fn serialize( &self, _serializer: &mut Serializer<'_, impl Write>, ) -> Result<(), SavefileError>
Source§impl<T: WithSchema> WithSchema for Removed<T>
impl<T: WithSchema> WithSchema for Removed<T>
impl<T: Copy> Copy for Removed<T>
impl<T: Eq> Eq for Removed<T>
impl<T> Send for Removed<T>
Removed is a zero-sized type. It contains a PhantomData<*const T>, which means it doesn’t implement Send or Sync per default. However, implementing these is actually safe, so implement it manually.
impl<T> StructuralPartialEq for Removed<T>
impl<T> Sync for Removed<T>
Removed is a zero-sized type. It contains a PhantomData<*const T>, which means it doesn’t implement Send or Sync per default. However, implementing these is actually safe, so implement it manually.
Auto Trait Implementations§
impl<T> Freeze for Removed<T>
impl<T> RefUnwindSafe for Removed<T>where
T: RefUnwindSafe,
impl<T> Unpin for Removed<T>
impl<T> UnwindSafe for Removed<T>where
T: RefUnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.