[][src]Enum fbxcel::low::v7400::AttributeValue

pub enum AttributeValue {
    Bool(bool),
    I16(i16),
    I32(i32),
    I64(i64),
    F32(f32),
    F64(f64),
    ArrBool(Vec<bool>),
    ArrI32(Vec<i32>),
    ArrI64(Vec<i64>),
    ArrF32(Vec<f32>),
    ArrF64(Vec<f64>),
    String(String),
    Binary(Vec<u8>),
}

Node attribute value.

To get a value of the specific type easily, use get_*() or get_*_or_type() method.

  • get_*() returns Option<_>.
    • If a value of the expected type available, returns Some(_).
    • If not, returns None.
  • get_*_or_type() returns Result<_, AttributeType>.
    • If a value of the expected type available, returns Ok(_).
    • If not, returns Ok(ty) where ty is value type (same value as returned by type_().

Variants

Bool(bool)

Single bool.

I16(i16)

Single i16.

I32(i32)

Single i32.

I64(i64)

Single i64.

F32(f32)

Single f32.

F64(f64)

Single f64.

ArrBool(Vec<bool>)

Array of bool.

ArrI32(Vec<i32>)

Array of i32.

ArrI64(Vec<i64>)

Array of i64.

ArrF32(Vec<f32>)

Array of f32.

ArrF64(Vec<f64>)

Array of f64.

String(String)

UTF-8 string.

Binary(Vec<u8>)

Binary.

Methods

impl AttributeValue[src]

pub fn type_(&self) -> AttributeType[src]

Returns the value type.

pub fn get_bool(&self) -> Option<bool>[src]

Returns the the inner bool value, if available.

pub fn get_bool_or_type(&self) -> Result<bool, AttributeType>[src]

Returns the the inner bool value, if available.

Returns Err(type) on type mismatch.

pub fn get_i16(&self) -> Option<i16>[src]

Returns the the inner i16 value, if available.

pub fn get_i16_or_type(&self) -> Result<i16, AttributeType>[src]

Returns the the inner i16 value, if available.

Returns Err(type) on type mismatch.

pub fn get_i32(&self) -> Option<i32>[src]

Returns the the inner i32 value, if available.

pub fn get_i32_or_type(&self) -> Result<i32, AttributeType>[src]

Returns the the inner i32 value, if available.

Returns Err(type) on type mismatch.

pub fn get_i64(&self) -> Option<i64>[src]

Returns the the inner i64 value, if available.

pub fn get_i64_or_type(&self) -> Result<i64, AttributeType>[src]

Returns the the inner i64 value, if available.

Returns Err(type) on type mismatch.

pub fn get_f32(&self) -> Option<f32>[src]

Returns the the inner f32 value, if available.

pub fn get_f32_or_type(&self) -> Result<f32, AttributeType>[src]

Returns the the inner f32 value, if available.

Returns Err(type) on type mismatch.

pub fn get_f64(&self) -> Option<f64>[src]

Returns the the inner f64 value, if available.

pub fn get_f64_or_type(&self) -> Result<f64, AttributeType>[src]

Returns the the inner f64 value, if available.

Returns Err(type) on type mismatch.

pub fn get_arr_bool(&self) -> Option<&[bool]>[src]

Returns the reference to the inner bool slice, if available.

pub fn get_arr_bool_or_type(&self) -> Result<&[bool], AttributeType>[src]

Returns the reference to the inner bool slice, if available.

Returns Err(type) on type mismatch.

pub fn get_arr_i32(&self) -> Option<&[i32]>[src]

Returns the reference to the inner i32 slice, if available.

pub fn get_arr_i32_or_type(&self) -> Result<&[i32], AttributeType>[src]

Returns the reference to the inner i32 slice, if available.

Returns Err(type) on type mismatch.

pub fn get_arr_i64(&self) -> Option<&[i64]>[src]

Returns the reference to the inner i64 slice, if available.

pub fn get_arr_i64_or_type(&self) -> Result<&[i64], AttributeType>[src]

Returns the reference to the inner i64 slice, if available.

Returns Err(type) on type mismatch.

pub fn get_arr_f32(&self) -> Option<&[f32]>[src]

Returns the reference to the inner f32 slice, if available.

pub fn get_arr_f32_or_type(&self) -> Result<&[f32], AttributeType>[src]

Returns the reference to the inner f32 slice, if available.

Returns Err(type) on type mismatch.

pub fn get_arr_f64(&self) -> Option<&[f64]>[src]

Returns the reference to the inner f64 slice, if available.

pub fn get_arr_f64_or_type(&self) -> Result<&[f64], AttributeType>[src]

Returns the reference to the inner f64 slice, if available.

Returns Err(type) on type mismatch.

pub fn get_string(&self) -> Option<&str>[src]

Returns the reference to the inner string slice, if available.

pub fn get_string_or_type(&self) -> Result<&str, AttributeType>[src]

Returns the reference to the inner string slice, if available.

Returns Err(type) on type mismatch.

pub fn get_binary(&self) -> Option<&[u8]>[src]

Returns the reference to the inner binary data, if available.

pub fn get_binary_or_type(&self) -> Result<&[u8], AttributeType>[src]

Returns the reference to the inner binary data, if available.

Returns Err(type) on type mismatch.

Trait Implementations

impl PartialEq<AttributeValue> for AttributeValue[src]

impl Clone for AttributeValue[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for AttributeValue[src]

Auto Trait Implementations

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]