pub enum SignalValue {
Bool(bool),
U32(u32),
I32(i32),
F32(f32),
F64(f64),
}Variants§
Implementations§
Source§impl SignalValue
impl SignalValue
pub fn signal_type(&self) -> SignalType
pub fn to_raw(&self) -> SimValueRaw
Sourcepub unsafe fn from_raw(raw: SimValueRaw) -> Option<Self>
pub unsafe fn from_raw(raw: SimValueRaw) -> Option<Self>
§Safety
The caller must ensure raw originated from a valid SimValue
representation using the sim_api.h ABI contract. If signal_type
does not match the active union field, behavior is undefined.
Trait Implementations§
Source§impl Clone for SignalValue
impl Clone for SignalValue
Source§fn clone(&self) -> SignalValue
fn clone(&self) -> SignalValue
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 moreSource§impl Debug for SignalValue
impl Debug for SignalValue
Source§impl<'de> Deserialize<'de> for SignalValue
impl<'de> Deserialize<'de> for SignalValue
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for SignalValue
impl PartialEq for SignalValue
Source§impl Serialize for SignalValue
impl Serialize for SignalValue
impl StructuralPartialEq for SignalValue
Auto Trait Implementations§
impl Freeze for SignalValue
impl RefUnwindSafe for SignalValue
impl Send for SignalValue
impl Sync for SignalValue
impl Unpin for SignalValue
impl UnsafeUnpin for SignalValue
impl UnwindSafe for SignalValue
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