Struct EmptyRecord
pub struct EmptyRecord;Expand description
A record representing the absence of persistent module state.
EmptyRecord is used for modules that do not store any data to be
serialized or restored (e.g., modules marked with #[module(skip)]
or modules without parameters).
This record contains no fields and serializes to None.
Implementations§
§impl EmptyRecord
impl EmptyRecord
pub fn new() -> EmptyRecord
pub fn new() -> EmptyRecord
Constructs a new EmptyRecord.
Trait Implementations§
§impl Clone for EmptyRecord
impl Clone for EmptyRecord
§fn clone(&self) -> EmptyRecord
fn clone(&self) -> EmptyRecord
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl Debug for EmptyRecord
impl Debug for EmptyRecord
§impl Default for EmptyRecord
impl Default for EmptyRecord
§fn default() -> EmptyRecord
fn default() -> EmptyRecord
Returns the “default value” for a type. Read more
§impl<'de> Deserialize<'de> for EmptyRecord
impl<'de> Deserialize<'de> for EmptyRecord
§fn deserialize<D>(
deserializer: D,
) -> Result<EmptyRecord, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<EmptyRecord, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl PartialEq for EmptyRecord
impl PartialEq for EmptyRecord
§impl<B> Record<B> for EmptyRecordwhere
B: Backend,
impl<B> Record<B> for EmptyRecordwhere
B: Backend,
§type Item<S: PrecisionSettings> = EmptyRecord
type Item<S: PrecisionSettings> = EmptyRecord
Type of the item that can be serialized and deserialized.
§fn into_item<S>(self) -> <EmptyRecord as Record<B>>::Item<S>where
S: PrecisionSettings,
fn into_item<S>(self) -> <EmptyRecord as Record<B>>::Item<S>where
S: PrecisionSettings,
Convert the current record into the corresponding item that follows the given settings.
§fn from_item<S>(
item: <EmptyRecord as Record<B>>::Item<S>,
_device: &<B as BackendTypes>::Device,
) -> EmptyRecordwhere
S: PrecisionSettings,
fn from_item<S>(
item: <EmptyRecord as Record<B>>::Item<S>,
_device: &<B as BackendTypes>::Device,
) -> EmptyRecordwhere
S: PrecisionSettings,
Convert the given item into a record.
§impl Serialize for EmptyRecord
impl Serialize for EmptyRecord
§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Copy for EmptyRecord
impl Eq for EmptyRecord
impl StructuralPartialEq for EmptyRecord
Auto Trait Implementations§
impl Freeze for EmptyRecord
impl RefUnwindSafe for EmptyRecord
impl Send for EmptyRecord
impl Sync for EmptyRecord
impl Unpin for EmptyRecord
impl UnwindSafe for EmptyRecord
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
§impl<C> CloneExpand for Cwhere
C: Clone,
impl<C> CloneExpand for Cwhere
C: Clone,
fn __expand_clone_method(&self, _scope: &mut Scope) -> C
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more