Struct burn::module::ConstantRecord
pub struct ConstantRecord;
Expand description
Record used for constant type implementing the module trait.
Implementations§
§impl ConstantRecord
impl ConstantRecord
pub fn new() -> ConstantRecord
pub fn new() -> ConstantRecord
Constructs a new ConstantRecord
.
Trait Implementations§
§impl Clone for ConstantRecord
impl Clone for ConstantRecord
§fn clone(&self) -> ConstantRecord
fn clone(&self) -> ConstantRecord
Returns a copy 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 ConstantRecord
impl Debug for ConstantRecord
§impl Default for ConstantRecord
impl Default for ConstantRecord
§fn default() -> ConstantRecord
fn default() -> ConstantRecord
Returns the “default value” for a type. Read more
§impl<'de> Deserialize<'de> for ConstantRecord
impl<'de> Deserialize<'de> for ConstantRecord
§fn deserialize<D>(
deserializer: D,
) -> Result<ConstantRecord, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<ConstantRecord, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl<B> Record<B> for ConstantRecordwhere
B: Backend,
impl<B> Record<B> for ConstantRecordwhere
B: Backend,
§type Item<S: PrecisionSettings> = ConstantRecord
type Item<S: PrecisionSettings> = ConstantRecord
Type of the item that can be serialized and deserialized.
§fn into_item<S>(self) -> <ConstantRecord as Record<B>>::Item<S>where
S: PrecisionSettings,
fn into_item<S>(self) -> <ConstantRecord 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: <ConstantRecord as Record<B>>::Item<S>,
_device: &<B as Backend>::Device,
) -> ConstantRecordwhere
S: PrecisionSettings,
fn from_item<S>(
item: <ConstantRecord as Record<B>>::Item<S>,
_device: &<B as Backend>::Device,
) -> ConstantRecordwhere
S: PrecisionSettings,
Convert the given item into a record.
§impl Serialize for ConstantRecord
impl Serialize for ConstantRecord
§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 ConstantRecord
Auto Trait Implementations§
impl Freeze for ConstantRecord
impl RefUnwindSafe for ConstantRecord
impl Send for ConstantRecord
impl Sync for ConstantRecord
impl Unpin for ConstantRecord
impl UnwindSafe for ConstantRecord
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§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§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian()
.