pub trait DebugValue: Sized {
const VALUE_TYPE: u32;
// Required method
fn from_debug_value(val: &DEBUG_VALUE) -> Self;
}
Expand description
A trait to extract a value from a [DEBUG_VALUE
].
Required Associated Constants§
Sourceconst VALUE_TYPE: u32
const VALUE_TYPE: u32
The corresponding DEBUG_VALUE_TYPE
for this type.
Required Methods§
Sourcefn from_debug_value(val: &DEBUG_VALUE) -> Self
fn from_debug_value(val: &DEBUG_VALUE) -> Self
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementations on Foreign Types§
Source§impl DebugValue for f32
impl DebugValue for f32
Source§const VALUE_TYPE: u32 = 5u32
const VALUE_TYPE: u32 = 5u32
Specifies that the value should be interpreted as a 32-bit floating-point number.
Source§fn from_debug_value(val: &DEBUG_VALUE) -> Self
fn from_debug_value(val: &DEBUG_VALUE) -> Self
Extracts a 32-bit floating-point value f32
from a DEBUG_VALUE
.
Source§impl DebugValue for f64
impl DebugValue for f64
Source§const VALUE_TYPE: u32 = 6u32
const VALUE_TYPE: u32 = 6u32
Specifies that the value should be interpreted as a 64-bit floating-point number.
Source§fn from_debug_value(val: &DEBUG_VALUE) -> Self
fn from_debug_value(val: &DEBUG_VALUE) -> Self
Extracts a 64-bit floating-point value f64
from a DEBUG_VALUE
.
Source§impl DebugValue for u32
impl DebugValue for u32
Source§const VALUE_TYPE: u32 = 3u32
const VALUE_TYPE: u32 = 3u32
Specifies that the value should be interpreted as a 32-bit integer.
Source§fn from_debug_value(val: &DEBUG_VALUE) -> Self
fn from_debug_value(val: &DEBUG_VALUE) -> Self
Extracts a 32-bit integer (u32
from a DEBUG_VALUE
.
Source§impl DebugValue for u64
impl DebugValue for u64
Source§const VALUE_TYPE: u32 = 4u32
const VALUE_TYPE: u32 = 4u32
Specifies that the value should be interpreted as a 64-bit integer.
Source§fn from_debug_value(val: &DEBUG_VALUE) -> Self
fn from_debug_value(val: &DEBUG_VALUE) -> Self
Extracts a 64-bit integer u64
from a DEBUG_VALUE
.