pub struct AbiRemoved<T, D = DefaultValueConstructor<T>>where
D: ValueConstructor<T>,{ /* private fields */ }Expand description
Helper struct which represents a field which has been removed, for use with SavefileAbi - supporting both serialization and deserialization.
In contrast to Removed, this type supports both serialization and
deserialization, and is preferred when SavefileAbi is to be used.
Regular Savefile does not support serializing older versions, whereas
SavefileAbi does.
Implementations§
Source§impl<T, D: ValueConstructor<T>> AbiRemoved<T, D>
impl<T, D: ValueConstructor<T>> AbiRemoved<T, D>
Sourcepub fn new() -> AbiRemoved<T, D>
pub fn new() -> AbiRemoved<T, D>
Helper to create an instance of AbiRemoved<T>. AbiRemoved<T> has no data.
Trait Implementations§
Source§impl<T: Clone, D> Clone for AbiRemoved<T, D>where
D: ValueConstructor<T> + Clone,
impl<T: Clone, D> Clone for AbiRemoved<T, D>where
D: ValueConstructor<T> + Clone,
Source§fn clone(&self) -> AbiRemoved<T, D>
fn clone(&self) -> AbiRemoved<T, D>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<T: Debug, D> Debug for AbiRemoved<T, D>where
D: ValueConstructor<T> + Debug,
impl<T: Debug, D> Debug for AbiRemoved<T, D>where
D: ValueConstructor<T> + Debug,
Source§impl<T: WithSchema + Deserialize, D: ValueConstructor<T>> Deserialize for AbiRemoved<T, D>
impl<T: WithSchema + Deserialize, D: ValueConstructor<T>> Deserialize for AbiRemoved<T, D>
Source§fn deserialize(
deserializer: &mut Deserializer<'_, impl Read>,
) -> Result<Self, SavefileError>
fn deserialize( deserializer: &mut Deserializer<'_, impl Read>, ) -> Result<Self, SavefileError>
Source§impl<T: Hash, D> Hash for AbiRemoved<T, D>where
D: ValueConstructor<T> + Hash,
impl<T: Hash, D> Hash for AbiRemoved<T, D>where
D: ValueConstructor<T> + Hash,
Source§impl<T: Introspect, D: ValueConstructor<T>> Introspect for AbiRemoved<T, D>
impl<T: Introspect, D: ValueConstructor<T>> Introspect for AbiRemoved<T, D>
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, D> Ord for AbiRemoved<T, D>where
D: ValueConstructor<T> + Ord,
impl<T: Ord, D> Ord for AbiRemoved<T, D>where
D: ValueConstructor<T> + Ord,
Source§fn cmp(&self, other: &AbiRemoved<T, D>) -> Ordering
fn cmp(&self, other: &AbiRemoved<T, D>) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl<T, D: ValueConstructor<T>> Packed for AbiRemoved<T, D>
impl<T, D: ValueConstructor<T>> Packed for AbiRemoved<T, D>
Source§unsafe fn repr_c_optimization_safe(_version: u32) -> IsPacked
unsafe fn repr_c_optimization_safe(_version: u32) -> IsPacked
Source§impl<T: PartialEq, D> PartialEq for AbiRemoved<T, D>where
D: ValueConstructor<T> + PartialEq,
impl<T: PartialEq, D> PartialEq for AbiRemoved<T, D>where
D: ValueConstructor<T> + PartialEq,
Source§impl<T: PartialOrd, D> PartialOrd for AbiRemoved<T, D>where
D: ValueConstructor<T> + PartialOrd,
impl<T: PartialOrd, D> PartialOrd for AbiRemoved<T, D>where
D: ValueConstructor<T> + PartialOrd,
Source§impl<T: WithSchema + Serialize + Default, D: ValueConstructor<T>> Serialize for AbiRemoved<T, D>
impl<T: WithSchema + Serialize + Default, D: ValueConstructor<T>> Serialize for AbiRemoved<T, D>
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, D: ValueConstructor<T>> WithSchema for AbiRemoved<T, D>
impl<T: WithSchema, D: ValueConstructor<T>> WithSchema for AbiRemoved<T, D>
impl<T: Copy, D> Copy for AbiRemoved<T, D>where
D: ValueConstructor<T> + Copy,
impl<T: Eq, D> Eq for AbiRemoved<T, D>where
D: ValueConstructor<T> + Eq,
impl<T, D: ValueConstructor<T>> Send for AbiRemoved<T, D>
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, D> StructuralPartialEq for AbiRemoved<T, D>where
D: ValueConstructor<T>,
impl<T, D: ValueConstructor<T>> Sync for AbiRemoved<T, D>
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, D> Freeze for AbiRemoved<T, D>
impl<T, D> RefUnwindSafe for AbiRemoved<T, D>where
T: RefUnwindSafe,
D: RefUnwindSafe,
impl<T, D> Unpin for AbiRemoved<T, D>
impl<T, D> UnwindSafe for AbiRemoved<T, D>where
T: RefUnwindSafe,
D: 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.