#[repr(C)]pub struct ScalarData<T> {
pub value: T,
}Expand description
Scalar data.
Fields§
§value: TThe value.
Implementations§
Source§impl<T> ScalarData<T>
impl<T> ScalarData<T>
Source§impl<T> ScalarData<T>
impl<T> ScalarData<T>
Sourcepub const fn new(value: T) -> Self
pub const fn new(value: T) -> Self
Initializes a new ScalarData instance.
Trait Implementations§
Source§impl AsMut<ScalarData<i16>> for HeadingI16
impl AsMut<ScalarData<i16>> for HeadingI16
Source§fn as_mut(&mut self) -> &mut ScalarData<i16>
fn as_mut(&mut self) -> &mut ScalarData<i16>
Converts this type into a mutable reference of the (usually inferred) input type.
Source§impl AsMut<ScalarData<i16>> for TemperatureI16
impl AsMut<ScalarData<i16>> for TemperatureI16
Source§fn as_mut(&mut self) -> &mut ScalarData<i16>
fn as_mut(&mut self) -> &mut ScalarData<i16>
Converts this type into a mutable reference of the (usually inferred) input type.
Source§impl AsMut<ScalarData<u32>> for SystemClockFrequency
impl AsMut<ScalarData<u32>> for SystemClockFrequency
Source§fn as_mut(&mut self) -> &mut ScalarData<u32>
fn as_mut(&mut self) -> &mut ScalarData<u32>
Converts this type into a mutable reference of the (usually inferred) input type.
Source§impl AsRef<ScalarData<i16>> for HeadingI16
impl AsRef<ScalarData<i16>> for HeadingI16
Source§fn as_ref(&self) -> &ScalarData<i16>
fn as_ref(&self) -> &ScalarData<i16>
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl AsRef<ScalarData<i16>> for TemperatureI16
impl AsRef<ScalarData<i16>> for TemperatureI16
Source§fn as_ref(&self) -> &ScalarData<i16>
fn as_ref(&self) -> &ScalarData<i16>
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl AsRef<ScalarData<u32>> for SystemClockFrequency
impl AsRef<ScalarData<u32>> for SystemClockFrequency
Source§fn as_ref(&self) -> &ScalarData<u32>
fn as_ref(&self) -> &ScalarData<u32>
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl<'__de, T> BorrowDecode<'__de> for ScalarData<T>where
T: BorrowDecode<'__de>,
impl<'__de, T> BorrowDecode<'__de> for ScalarData<T>where
T: BorrowDecode<'__de>,
Source§fn borrow_decode<__D: BorrowDecoder<'__de>>(
decoder: &mut __D,
) -> Result<Self, DecodeError>
fn borrow_decode<__D: BorrowDecoder<'__de>>( decoder: &mut __D, ) -> Result<Self, DecodeError>
Attempt to decode this type with the given BorrowDecode.
Source§impl<T: Clone> Clone for ScalarData<T>
impl<T: Clone> Clone for ScalarData<T>
Source§fn clone(&self) -> ScalarData<T>
fn clone(&self) -> ScalarData<T>
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 moreSource§impl<T: Debug> Debug for ScalarData<T>
impl<T: Debug> Debug for ScalarData<T>
Source§impl<T> Decode for ScalarData<T>where
T: Decode,
impl<T> Decode for ScalarData<T>where
T: Decode,
Source§impl<T: Default> Default for ScalarData<T>
impl<T: Default> Default for ScalarData<T>
Source§fn default() -> ScalarData<T>
fn default() -> ScalarData<T>
Returns the “default value” for a type. Read more
Source§impl<T> Encode for ScalarData<T>where
T: Encode,
impl<T> Encode for ScalarData<T>where
T: Encode,
Source§impl<T> Format for ScalarData<T>where
T: Format,
impl<T> Format for ScalarData<T>where
T: Format,
Source§impl From<HeadingI16> for ScalarData<i16>
impl From<HeadingI16> for ScalarData<i16>
Source§fn from(value: HeadingI16) -> ScalarData<i16>
fn from(value: HeadingI16) -> ScalarData<i16>
Converts to this type from the input type.
Source§impl<T> From<ScalarData<T>> for [T; 1]
impl<T> From<ScalarData<T>> for [T; 1]
Source§fn from(value: ScalarData<T>) -> Self
fn from(value: ScalarData<T>) -> Self
Converts to this type from the input type.
Source§impl From<ScalarData<i16>> for HeadingI16
impl From<ScalarData<i16>> for HeadingI16
Source§fn from(value: ScalarData<i16>) -> HeadingI16
fn from(value: ScalarData<i16>) -> HeadingI16
Converts to this type from the input type.
Source§impl From<ScalarData<i16>> for TemperatureI16
impl From<ScalarData<i16>> for TemperatureI16
Source§fn from(value: ScalarData<i16>) -> TemperatureI16
fn from(value: ScalarData<i16>) -> TemperatureI16
Converts to this type from the input type.
Source§impl From<ScalarData<u32>> for SystemClockFrequency
impl From<ScalarData<u32>> for SystemClockFrequency
Source§fn from(value: ScalarData<u32>) -> SystemClockFrequency
fn from(value: ScalarData<u32>) -> SystemClockFrequency
Converts to this type from the input type.
Source§impl From<SystemClockFrequency> for ScalarData<u32>
impl From<SystemClockFrequency> for ScalarData<u32>
Source§fn from(value: SystemClockFrequency) -> ScalarData<u32>
fn from(value: SystemClockFrequency) -> ScalarData<u32>
Converts to this type from the input type.
Source§impl<T> From<T> for ScalarData<T>
impl<T> From<T> for ScalarData<T>
Source§impl From<TemperatureI16> for ScalarData<i16>
impl From<TemperatureI16> for ScalarData<i16>
Source§fn from(value: TemperatureI16) -> ScalarData<i16>
fn from(value: TemperatureI16) -> ScalarData<i16>
Converts to this type from the input type.
Source§impl<T: Hash> Hash for ScalarData<T>
impl<T: Hash> Hash for ScalarData<T>
Source§impl<T> Index<usize> for ScalarData<T>
impl<T> Index<usize> for ScalarData<T>
Source§impl<T> IndexMut<usize> for ScalarData<T>
impl<T> IndexMut<usize> for ScalarData<T>
Source§impl<T: Ord> Ord for ScalarData<T>
impl<T: Ord> Ord for ScalarData<T>
Source§fn cmp(&self, other: &ScalarData<T>) -> Ordering
fn cmp(&self, other: &ScalarData<T>) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<T: PartialEq> PartialEq for ScalarData<T>
impl<T: PartialEq> PartialEq for ScalarData<T>
Source§impl<T: PartialOrd> PartialOrd for ScalarData<T>
impl<T: PartialOrd> PartialOrd for ScalarData<T>
impl<T: Copy> Copy for ScalarData<T>
impl<T: Eq> Eq for ScalarData<T>
impl<T> StructuralPartialEq for ScalarData<T>
Auto Trait Implementations§
impl<T> Freeze for ScalarData<T>where
T: Freeze,
impl<T> RefUnwindSafe for ScalarData<T>where
T: RefUnwindSafe,
impl<T> Send for ScalarData<T>where
T: Send,
impl<T> Sync for ScalarData<T>where
T: Sync,
impl<T> Unpin for ScalarData<T>where
T: Unpin,
impl<T> UnwindSafe for ScalarData<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