Struct ark_api::world::Value

source ·
#[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

source

pub fn as_i64(&self) -> i64

source

pub fn from_i64(v: i64) -> Value

source

pub fn as_f32(&self) -> f32

source

pub fn from_f32(v: f32) -> Value

source

pub fn as_vec2(&self) -> [f32; 2]

source

pub fn from_vec2(v: [f32; 2]) -> Value

source

pub fn as_vec3(&self) -> [f32; 3]

source

pub fn from_vec3(v: [f32; 3]) -> Value

source

pub fn as_vec4(&self) -> [f32; 4]

source

pub fn from_vec4(v: [f32; 4]) -> Value

source

pub fn as_quat(&self) -> [f32; 4]

source

pub fn from_quat(v: [f32; 4]) -> Value

source

pub fn none() -> Value

source

pub fn as_bool(&self) -> bool

source

pub fn from_bool(v: bool) -> Value

Trait Implementations§

source§

impl CheckedBitPattern for Value

§

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

If this function returns true, then it must be valid to reinterpret bits as &Self.
source§

impl Clone for Value

source§

fn clone(&self) -> Value

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Value

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl From<&Value> for ParamType

source§

fn from(v: &Value) -> Self

Converts to this type from the input type.
source§

impl From<ParamType> for Value

source§

fn from(param_type: ParamType) -> Self

Converts to this type from the input type.
source§

impl Copy for Value

source§

impl NoUninit for Value

Auto Trait Implementations§

§

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> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.