#[repr(C)]pub struct Value {
pub value_type: ValueType,
pub _pad: u32,
pub value_data: ValueData,
}
Fields§
§value_type: ValueType
§_pad: u32
§value_data: ValueData
Implementations§
Source§impl Value
impl Value
pub fn as_i64(&self) -> i64
pub fn from_i64(v: i64) -> Self
pub fn as_f32(&self) -> f32
pub fn from_f32(v: f32) -> Self
pub fn as_vec2(&self) -> [f32; 2]
pub fn from_vec2(v: [f32; 2]) -> Self
pub fn as_vec3(&self) -> [f32; 3]
pub fn from_vec3(v: [f32; 3]) -> Self
pub fn as_vec4(&self) -> [f32; 4]
pub fn from_vec4(v: [f32; 4]) -> Self
pub fn as_quat(&self) -> [f32; 4]
pub fn from_quat(v: [f32; 4]) -> Self
pub fn none() -> Self
pub fn as_bool(&self) -> bool
pub fn from_bool(v: bool) -> Self
Trait Implementations§
Source§impl CheckedBitPattern for Value
impl CheckedBitPattern for Value
Source§type Bits = ValueBits
type Bits = ValueBits
Self
must have the same layout as the specified Bits
except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern
.Source§fn is_valid_bit_pattern(bits: &ValueBits) -> bool
fn is_valid_bit_pattern(bits: &ValueBits) -> bool
If this function returns true, then it must be valid to reinterpret
bits
as &Self
.impl Copy for Value
impl NoUninit for Value
Auto Trait Implementations§
impl Freeze for Value
impl RefUnwindSafe for Value
impl Send for Value
impl Sync for Value
impl Unpin for Value
impl UnwindSafe for Value
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