[−][src]Enum fbxcel::low::v7400::AttributeValue
Node attribute value.
To get a value of the specific type easily, use get_*()
or
get_*_or_type()
method.
get_*()
returnsOption<_>
.- If a value of the expected type available, returns
Some(_)
. - If not, returns
None
.
- If a value of the expected type available, returns
get_*_or_type()
returnsResult<_, AttributeType>
.- If a value of the expected type available, returns
Ok(_)
. - If not, returns
Ok(ty)
wherety
is value type (same value as returned bytype_()
.
- If a value of the expected type available, returns
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]
fn eq(&self, other: &AttributeValue) -> bool
[src]
fn ne(&self, other: &AttributeValue) -> bool
[src]
impl Clone for AttributeValue
[src]
fn clone(&self) -> 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
impl Send for AttributeValue
impl Sync for AttributeValue
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,