pub enum Value {
Show 88 variants
None,
Bool(bool),
BoolVec(Vec<bool>),
Uchar(u8),
UcharVec(Vec<u8>),
Int(i32),
IntVec(Vec<i32>),
Uint(u32),
UintVec(Vec<u32>),
Int64(i64),
Int64Vec(Vec<i64>),
Uint64(u64),
Uint64Vec(Vec<u64>),
Half(f16),
HalfVec(Vec<f16>),
Float(f32),
FloatVec(Vec<f32>),
Double(f64),
DoubleVec(Vec<f64>),
String(String),
StringVec(Vec<String>),
Token(Token),
TokenVec(Vec<Token>),
AssetPath(AssetPath),
AssetPathVec(Vec<AssetPath>),
Quath(Quath),
Quatf(Quatf),
Quatd(Quatd),
QuathVec(Vec<Quath>),
QuatfVec(Vec<Quatf>),
QuatdVec(Vec<Quatd>),
Vec2h(Vec2h),
Vec2f(Vec2f),
Vec2d(Vec2d),
Vec2i(Vec2i),
Vec2hVec(Vec<Vec2h>),
Vec2fVec(Vec<Vec2f>),
Vec2dVec(Vec<Vec2d>),
Vec2iVec(Vec<Vec2i>),
Vec3h(Vec3h),
Vec3f(Vec3f),
Vec3d(Vec3d),
Vec3i(Vec3i),
Vec3hVec(Vec<Vec3h>),
Vec3fVec(Vec<Vec3f>),
Vec3dVec(Vec<Vec3d>),
Vec3iVec(Vec<Vec3i>),
Vec4h(Vec4h),
Vec4f(Vec4f),
Vec4d(Vec4d),
Vec4i(Vec4i),
Vec4hVec(Vec<Vec4h>),
Vec4fVec(Vec<Vec4f>),
Vec4dVec(Vec<Vec4d>),
Vec4iVec(Vec<Vec4i>),
Matrix2d(Mat2d),
Matrix3d(Mat3d),
Matrix4d(Matrix4d),
Matrix2dVec(Vec<Mat2d>),
Matrix3dVec(Vec<Mat3d>),
Matrix4dVec(Vec<Matrix4d>),
Specifier(Specifier),
Permission(Permission),
Variability(Variability),
Dictionary(HashMap<String, Value>),
TokenListOp(TokenListOp),
StringListOp(StringListOp),
PathListOp(PathListOp),
ReferenceListOp(ReferenceListOp),
IntListOp(IntListOp),
Int64ListOp(Int64ListOp),
UIntListOp(UintListOp),
UInt64ListOp(Uint64ListOp),
PayloadListOp(PayloadListOp),
Payload(Payload),
PathVec(Vec<Path>),
Relocates(RelocateList),
VariantSelectionMap(HashMap<String, String>),
TimeSamples(TimeSampleMap),
LayerOffsetVec(Vec<LayerOffset>),
ValueBlock,
Value,
ValueVec(Vec<Value>),
UnregisteredValue(String),
UnregisteredValueListOp(StringListOp),
TimeCode(TimeCode),
TimeCodeVec(Vec<TimeCode>),
PathExpression(String),
}Expand description
A type-erased container for scene description data loaded from a USD file.
This is the Rust equivalent of USD’s VtValue,
representing any value that can appear in a scene description layer. Each variant corresponds
to a USD data type.
Vector and matrix variant suffixes indicate the element type:
d—f64(double)f—f32(float)h—f16(half)i—i32(int)
Type-safe extraction is supported via TryFrom<Value> implementations for common Rust
types (e.g. f32, String, gf::Vec3f).
Variants§
None
None value, only produced by expressions (not directly assignable).
Bool(bool)
BoolVec(Vec<bool>)
Uchar(u8)
UcharVec(Vec<u8>)
Int(i32)
IntVec(Vec<i32>)
Uint(u32)
UintVec(Vec<u32>)
Int64(i64)
Int64Vec(Vec<i64>)
Uint64(u64)
Uint64Vec(Vec<u64>)
Half(f16)
HalfVec(Vec<f16>)
Float(f32)
FloatVec(Vec<f32>)
Double(f64)
DoubleVec(Vec<f64>)
String(String)
StringVec(Vec<String>)
Token(Token)
TokenVec(Vec<Token>)
AssetPath(AssetPath)
AssetPathVec(Vec<AssetPath>)
Quath(Quath)
Quatf(Quatf)
Quatd(Quatd)
QuathVec(Vec<Quath>)
QuatfVec(Vec<Quatf>)
QuatdVec(Vec<Quatd>)
Vec2h(Vec2h)
Vec2f(Vec2f)
Vec2d(Vec2d)
Vec2i(Vec2i)
Vec2hVec(Vec<Vec2h>)
Vec2fVec(Vec<Vec2f>)
Vec2dVec(Vec<Vec2d>)
Vec2iVec(Vec<Vec2i>)
Vec3h(Vec3h)
Vec3f(Vec3f)
Vec3d(Vec3d)
Vec3i(Vec3i)
Vec3hVec(Vec<Vec3h>)
Vec3fVec(Vec<Vec3f>)
Vec3dVec(Vec<Vec3d>)
Vec3iVec(Vec<Vec3i>)
Vec4h(Vec4h)
Vec4f(Vec4f)
Vec4d(Vec4d)
Vec4i(Vec4i)
Vec4hVec(Vec<Vec4h>)
Vec4fVec(Vec<Vec4f>)
Vec4dVec(Vec<Vec4d>)
Vec4iVec(Vec<Vec4i>)
Matrix2d(Mat2d)
Matrix3d(Mat3d)
Matrix4d(Matrix4d)
Matrix2dVec(Vec<Mat2d>)
Matrix3dVec(Vec<Mat3d>)
Matrix4dVec(Vec<Matrix4d>)
Specifier(Specifier)
Permission(Permission)
Variability(Variability)
Dictionary(HashMap<String, Value>)
TokenListOp(TokenListOp)
StringListOp(StringListOp)
PathListOp(PathListOp)
ReferenceListOp(ReferenceListOp)
IntListOp(IntListOp)
Int64ListOp(Int64ListOp)
UIntListOp(UintListOp)
UInt64ListOp(Uint64ListOp)
PayloadListOp(PayloadListOp)
Payload(Payload)
PathVec(Vec<Path>)
Relocates(RelocateList)
Layer-level relocates: (source, target) path pairs for namespace remapping.
VariantSelectionMap(HashMap<String, String>)
TimeSamples(TimeSampleMap)
LayerOffsetVec(Vec<LayerOffset>)
ValueBlock
Value
ValueVec(Vec<Value>)
Heterogeneous array (e.g. spline knots). Each element is a Value.
UnregisteredValue(String)
UnregisteredValueListOp(StringListOp)
TimeCode(TimeCode)
TimeCodeVec(Vec<TimeCode>)
PathExpression(String)
Implementations§
Source§impl Value
impl Value
Sourcepub const fn is_bool_vec(&self) -> bool
pub const fn is_bool_vec(&self) -> bool
Returns true if the enum is Value::BoolVec otherwise false
Sourcepub const fn is_uchar_vec(&self) -> bool
pub const fn is_uchar_vec(&self) -> bool
Returns true if the enum is Value::UcharVec otherwise false
Sourcepub const fn is_int_vec(&self) -> bool
pub const fn is_int_vec(&self) -> bool
Returns true if the enum is Value::IntVec otherwise false
Sourcepub const fn is_uint_vec(&self) -> bool
pub const fn is_uint_vec(&self) -> bool
Returns true if the enum is Value::UintVec otherwise false
Sourcepub const fn is_int_64_vec(&self) -> bool
pub const fn is_int_64_vec(&self) -> bool
Returns true if the enum is Value::Int64Vec otherwise false
Sourcepub const fn is_uint_64(&self) -> bool
pub const fn is_uint_64(&self) -> bool
Returns true if the enum is Value::Uint64 otherwise false
Sourcepub const fn is_uint_64_vec(&self) -> bool
pub const fn is_uint_64_vec(&self) -> bool
Returns true if the enum is Value::Uint64Vec otherwise false
Sourcepub const fn is_half_vec(&self) -> bool
pub const fn is_half_vec(&self) -> bool
Returns true if the enum is Value::HalfVec otherwise false
Sourcepub const fn is_float_vec(&self) -> bool
pub const fn is_float_vec(&self) -> bool
Returns true if the enum is Value::FloatVec otherwise false
Sourcepub const fn is_double(&self) -> bool
pub const fn is_double(&self) -> bool
Returns true if the enum is Value::Double otherwise false
Sourcepub const fn is_double_vec(&self) -> bool
pub const fn is_double_vec(&self) -> bool
Returns true if the enum is Value::DoubleVec otherwise false
Sourcepub const fn is_string(&self) -> bool
pub const fn is_string(&self) -> bool
Returns true if the enum is Value::String otherwise false
Sourcepub const fn is_string_vec(&self) -> bool
pub const fn is_string_vec(&self) -> bool
Returns true if the enum is Value::StringVec otherwise false
Sourcepub const fn is_token_vec(&self) -> bool
pub const fn is_token_vec(&self) -> bool
Returns true if the enum is Value::TokenVec otherwise false
Sourcepub const fn is_asset_path(&self) -> bool
pub const fn is_asset_path(&self) -> bool
Returns true if the enum is Value::AssetPath otherwise false
Sourcepub const fn is_asset_path_vec(&self) -> bool
pub const fn is_asset_path_vec(&self) -> bool
Returns true if the enum is Value::AssetPathVec otherwise false
Sourcepub const fn is_quath_vec(&self) -> bool
pub const fn is_quath_vec(&self) -> bool
Returns true if the enum is Value::QuathVec otherwise false
Sourcepub const fn is_quatf_vec(&self) -> bool
pub const fn is_quatf_vec(&self) -> bool
Returns true if the enum is Value::QuatfVec otherwise false
Sourcepub const fn is_quatd_vec(&self) -> bool
pub const fn is_quatd_vec(&self) -> bool
Returns true if the enum is Value::QuatdVec otherwise false
Sourcepub const fn is_vec_2h_vec(&self) -> bool
pub const fn is_vec_2h_vec(&self) -> bool
Returns true if the enum is Value::Vec2hVec otherwise false
Sourcepub const fn is_vec_2f_vec(&self) -> bool
pub const fn is_vec_2f_vec(&self) -> bool
Returns true if the enum is Value::Vec2fVec otherwise false
Sourcepub const fn is_vec_2d_vec(&self) -> bool
pub const fn is_vec_2d_vec(&self) -> bool
Returns true if the enum is Value::Vec2dVec otherwise false
Sourcepub const fn is_vec_2i_vec(&self) -> bool
pub const fn is_vec_2i_vec(&self) -> bool
Returns true if the enum is Value::Vec2iVec otherwise false
Sourcepub const fn is_vec_3h_vec(&self) -> bool
pub const fn is_vec_3h_vec(&self) -> bool
Returns true if the enum is Value::Vec3hVec otherwise false
Sourcepub const fn is_vec_3f_vec(&self) -> bool
pub const fn is_vec_3f_vec(&self) -> bool
Returns true if the enum is Value::Vec3fVec otherwise false
Sourcepub const fn is_vec_3d_vec(&self) -> bool
pub const fn is_vec_3d_vec(&self) -> bool
Returns true if the enum is Value::Vec3dVec otherwise false
Sourcepub const fn is_vec_3i_vec(&self) -> bool
pub const fn is_vec_3i_vec(&self) -> bool
Returns true if the enum is Value::Vec3iVec otherwise false
Sourcepub const fn is_vec_4h_vec(&self) -> bool
pub const fn is_vec_4h_vec(&self) -> bool
Returns true if the enum is Value::Vec4hVec otherwise false
Sourcepub const fn is_vec_4f_vec(&self) -> bool
pub const fn is_vec_4f_vec(&self) -> bool
Returns true if the enum is Value::Vec4fVec otherwise false
Sourcepub const fn is_vec_4d_vec(&self) -> bool
pub const fn is_vec_4d_vec(&self) -> bool
Returns true if the enum is Value::Vec4dVec otherwise false
Sourcepub const fn is_vec_4i_vec(&self) -> bool
pub const fn is_vec_4i_vec(&self) -> bool
Returns true if the enum is Value::Vec4iVec otherwise false
Sourcepub const fn is_matrix_2d(&self) -> bool
pub const fn is_matrix_2d(&self) -> bool
Returns true if the enum is Value::Matrix2d otherwise false
Sourcepub const fn is_matrix_3d(&self) -> bool
pub const fn is_matrix_3d(&self) -> bool
Returns true if the enum is Value::Matrix3d otherwise false
Sourcepub const fn is_matrix_4d(&self) -> bool
pub const fn is_matrix_4d(&self) -> bool
Returns true if the enum is Value::Matrix4d otherwise false
Sourcepub const fn is_matrix_2d_vec(&self) -> bool
pub const fn is_matrix_2d_vec(&self) -> bool
Returns true if the enum is Value::Matrix2dVec otherwise false
Sourcepub const fn is_matrix_3d_vec(&self) -> bool
pub const fn is_matrix_3d_vec(&self) -> bool
Returns true if the enum is Value::Matrix3dVec otherwise false
Sourcepub const fn is_matrix_4d_vec(&self) -> bool
pub const fn is_matrix_4d_vec(&self) -> bool
Returns true if the enum is Value::Matrix4dVec otherwise false
Sourcepub const fn is_specifier(&self) -> bool
pub const fn is_specifier(&self) -> bool
Returns true if the enum is Value::Specifier otherwise false
Sourcepub const fn is_permission(&self) -> bool
pub const fn is_permission(&self) -> bool
Returns true if the enum is Value::Permission otherwise false
Sourcepub const fn is_variability(&self) -> bool
pub const fn is_variability(&self) -> bool
Returns true if the enum is Value::Variability otherwise false
Sourcepub const fn is_dictionary(&self) -> bool
pub const fn is_dictionary(&self) -> bool
Returns true if the enum is Value::Dictionary otherwise false
Sourcepub const fn is_token_list_op(&self) -> bool
pub const fn is_token_list_op(&self) -> bool
Returns true if the enum is Value::TokenListOp otherwise false
Sourcepub const fn is_string_list_op(&self) -> bool
pub const fn is_string_list_op(&self) -> bool
Returns true if the enum is Value::StringListOp otherwise false
Sourcepub const fn is_path_list_op(&self) -> bool
pub const fn is_path_list_op(&self) -> bool
Returns true if the enum is Value::PathListOp otherwise false
Sourcepub const fn is_reference_list_op(&self) -> bool
pub const fn is_reference_list_op(&self) -> bool
Returns true if the enum is Value::ReferenceListOp otherwise false
Sourcepub const fn is_int_list_op(&self) -> bool
pub const fn is_int_list_op(&self) -> bool
Returns true if the enum is Value::IntListOp otherwise false
Sourcepub const fn is_int_64_list_op(&self) -> bool
pub const fn is_int_64_list_op(&self) -> bool
Returns true if the enum is Value::Int64ListOp otherwise false
Sourcepub const fn is_u_int_list_op(&self) -> bool
pub const fn is_u_int_list_op(&self) -> bool
Returns true if the enum is Value::UIntListOp otherwise false
Sourcepub const fn is_u_int_64_list_op(&self) -> bool
pub const fn is_u_int_64_list_op(&self) -> bool
Returns true if the enum is Value::UInt64ListOp otherwise false
Sourcepub const fn is_payload_list_op(&self) -> bool
pub const fn is_payload_list_op(&self) -> bool
Returns true if the enum is Value::PayloadListOp otherwise false
Sourcepub const fn is_payload(&self) -> bool
pub const fn is_payload(&self) -> bool
Returns true if the enum is Value::Payload otherwise false
Sourcepub const fn is_path_vec(&self) -> bool
pub const fn is_path_vec(&self) -> bool
Returns true if the enum is Value::PathVec otherwise false
Sourcepub const fn is_relocates(&self) -> bool
pub const fn is_relocates(&self) -> bool
Returns true if the enum is Value::Relocates otherwise false
Sourcepub const fn is_variant_selection_map(&self) -> bool
pub const fn is_variant_selection_map(&self) -> bool
Returns true if the enum is Value::VariantSelectionMap otherwise false
Sourcepub const fn is_time_samples(&self) -> bool
pub const fn is_time_samples(&self) -> bool
Returns true if the enum is Value::TimeSamples otherwise false
Sourcepub const fn is_layer_offset_vec(&self) -> bool
pub const fn is_layer_offset_vec(&self) -> bool
Returns true if the enum is Value::LayerOffsetVec otherwise false
Sourcepub const fn is_value_block(&self) -> bool
pub const fn is_value_block(&self) -> bool
Returns true if the enum is Value::ValueBlock otherwise false
Sourcepub const fn is_value_vec(&self) -> bool
pub const fn is_value_vec(&self) -> bool
Returns true if the enum is Value::ValueVec otherwise false
Sourcepub const fn is_unregistered_value(&self) -> bool
pub const fn is_unregistered_value(&self) -> bool
Returns true if the enum is Value::UnregisteredValue otherwise false
Sourcepub const fn is_unregistered_value_list_op(&self) -> bool
pub const fn is_unregistered_value_list_op(&self) -> bool
Returns true if the enum is Value::UnregisteredValueListOp otherwise false
Sourcepub const fn is_time_code(&self) -> bool
pub const fn is_time_code(&self) -> bool
Returns true if the enum is Value::TimeCode otherwise false
Sourcepub const fn is_time_code_vec(&self) -> bool
pub const fn is_time_code_vec(&self) -> bool
Returns true if the enum is Value::TimeCodeVec otherwise false
Sourcepub const fn is_path_expression(&self) -> bool
pub const fn is_path_expression(&self) -> bool
Returns true if the enum is Value::PathExpression otherwise false
Source§impl Value
impl Value
pub fn try_as_bool(self) -> Option<bool>
pub const fn try_as_bool_ref(&self) -> Option<&bool>
pub fn try_as_bool_mut(&mut self) -> Option<&mut bool>
pub fn try_as_bool_vec(self) -> Option<Vec<bool>>
pub const fn try_as_bool_vec_ref(&self) -> Option<&Vec<bool>>
pub fn try_as_bool_vec_mut(&mut self) -> Option<&mut Vec<bool>>
pub fn try_as_uchar(self) -> Option<u8>
pub const fn try_as_uchar_ref(&self) -> Option<&u8>
pub fn try_as_uchar_mut(&mut self) -> Option<&mut u8>
pub fn try_as_uchar_vec(self) -> Option<Vec<u8>>
pub const fn try_as_uchar_vec_ref(&self) -> Option<&Vec<u8>>
pub fn try_as_uchar_vec_mut(&mut self) -> Option<&mut Vec<u8>>
pub fn try_as_int(self) -> Option<i32>
pub const fn try_as_int_ref(&self) -> Option<&i32>
pub fn try_as_int_mut(&mut self) -> Option<&mut i32>
pub fn try_as_int_vec(self) -> Option<Vec<i32>>
pub const fn try_as_int_vec_ref(&self) -> Option<&Vec<i32>>
pub fn try_as_int_vec_mut(&mut self) -> Option<&mut Vec<i32>>
pub fn try_as_uint(self) -> Option<u32>
pub const fn try_as_uint_ref(&self) -> Option<&u32>
pub fn try_as_uint_mut(&mut self) -> Option<&mut u32>
pub fn try_as_uint_vec(self) -> Option<Vec<u32>>
pub const fn try_as_uint_vec_ref(&self) -> Option<&Vec<u32>>
pub fn try_as_uint_vec_mut(&mut self) -> Option<&mut Vec<u32>>
pub fn try_as_int_64(self) -> Option<i64>
pub const fn try_as_int_64_ref(&self) -> Option<&i64>
pub fn try_as_int_64_mut(&mut self) -> Option<&mut i64>
pub fn try_as_int_64_vec(self) -> Option<Vec<i64>>
pub const fn try_as_int_64_vec_ref(&self) -> Option<&Vec<i64>>
pub fn try_as_int_64_vec_mut(&mut self) -> Option<&mut Vec<i64>>
pub fn try_as_uint_64(self) -> Option<u64>
pub const fn try_as_uint_64_ref(&self) -> Option<&u64>
pub fn try_as_uint_64_mut(&mut self) -> Option<&mut u64>
pub fn try_as_uint_64_vec(self) -> Option<Vec<u64>>
pub const fn try_as_uint_64_vec_ref(&self) -> Option<&Vec<u64>>
pub fn try_as_uint_64_vec_mut(&mut self) -> Option<&mut Vec<u64>>
pub fn try_as_half(self) -> Option<f16>
pub const fn try_as_half_ref(&self) -> Option<&f16>
pub fn try_as_half_mut(&mut self) -> Option<&mut f16>
pub fn try_as_half_vec(self) -> Option<Vec<f16>>
pub const fn try_as_half_vec_ref(&self) -> Option<&Vec<f16>>
pub fn try_as_half_vec_mut(&mut self) -> Option<&mut Vec<f16>>
pub fn try_as_float(self) -> Option<f32>
pub const fn try_as_float_ref(&self) -> Option<&f32>
pub fn try_as_float_mut(&mut self) -> Option<&mut f32>
pub fn try_as_float_vec(self) -> Option<Vec<f32>>
pub const fn try_as_float_vec_ref(&self) -> Option<&Vec<f32>>
pub fn try_as_float_vec_mut(&mut self) -> Option<&mut Vec<f32>>
pub fn try_as_double(self) -> Option<f64>
pub const fn try_as_double_ref(&self) -> Option<&f64>
pub fn try_as_double_mut(&mut self) -> Option<&mut f64>
pub fn try_as_double_vec(self) -> Option<Vec<f64>>
pub const fn try_as_double_vec_ref(&self) -> Option<&Vec<f64>>
pub fn try_as_double_vec_mut(&mut self) -> Option<&mut Vec<f64>>
pub fn try_as_string(self) -> Option<String>
pub const fn try_as_string_ref(&self) -> Option<&String>
pub fn try_as_string_mut(&mut self) -> Option<&mut String>
pub fn try_as_string_vec(self) -> Option<Vec<String>>
pub const fn try_as_string_vec_ref(&self) -> Option<&Vec<String>>
pub fn try_as_string_vec_mut(&mut self) -> Option<&mut Vec<String>>
pub fn try_as_token(self) -> Option<Token>
pub const fn try_as_token_ref(&self) -> Option<&Token>
pub fn try_as_token_mut(&mut self) -> Option<&mut Token>
pub fn try_as_token_vec(self) -> Option<Vec<Token>>
pub const fn try_as_token_vec_ref(&self) -> Option<&Vec<Token>>
pub fn try_as_token_vec_mut(&mut self) -> Option<&mut Vec<Token>>
pub fn try_as_asset_path(self) -> Option<AssetPath>
pub const fn try_as_asset_path_ref(&self) -> Option<&AssetPath>
pub fn try_as_asset_path_mut(&mut self) -> Option<&mut AssetPath>
pub fn try_as_asset_path_vec(self) -> Option<Vec<AssetPath>>
pub const fn try_as_asset_path_vec_ref(&self) -> Option<&Vec<AssetPath>>
pub fn try_as_asset_path_vec_mut(&mut self) -> Option<&mut Vec<AssetPath>>
pub fn try_as_quath(self) -> Option<Quath>
pub const fn try_as_quath_ref(&self) -> Option<&Quath>
pub fn try_as_quath_mut(&mut self) -> Option<&mut Quath>
pub fn try_as_quatf(self) -> Option<Quatf>
pub const fn try_as_quatf_ref(&self) -> Option<&Quatf>
pub fn try_as_quatf_mut(&mut self) -> Option<&mut Quatf>
pub fn try_as_quatd(self) -> Option<Quatd>
pub const fn try_as_quatd_ref(&self) -> Option<&Quatd>
pub fn try_as_quatd_mut(&mut self) -> Option<&mut Quatd>
pub fn try_as_quath_vec(self) -> Option<Vec<Quath>>
pub const fn try_as_quath_vec_ref(&self) -> Option<&Vec<Quath>>
pub fn try_as_quath_vec_mut(&mut self) -> Option<&mut Vec<Quath>>
pub fn try_as_quatf_vec(self) -> Option<Vec<Quatf>>
pub const fn try_as_quatf_vec_ref(&self) -> Option<&Vec<Quatf>>
pub fn try_as_quatf_vec_mut(&mut self) -> Option<&mut Vec<Quatf>>
pub fn try_as_quatd_vec(self) -> Option<Vec<Quatd>>
pub const fn try_as_quatd_vec_ref(&self) -> Option<&Vec<Quatd>>
pub fn try_as_quatd_vec_mut(&mut self) -> Option<&mut Vec<Quatd>>
pub fn try_as_vec_2h(self) -> Option<Vec2h>
pub const fn try_as_vec_2h_ref(&self) -> Option<&Vec2h>
pub fn try_as_vec_2h_mut(&mut self) -> Option<&mut Vec2h>
pub fn try_as_vec_2f(self) -> Option<Vec2f>
pub const fn try_as_vec_2f_ref(&self) -> Option<&Vec2f>
pub fn try_as_vec_2f_mut(&mut self) -> Option<&mut Vec2f>
pub fn try_as_vec_2d(self) -> Option<Vec2d>
pub const fn try_as_vec_2d_ref(&self) -> Option<&Vec2d>
pub fn try_as_vec_2d_mut(&mut self) -> Option<&mut Vec2d>
pub fn try_as_vec_2i(self) -> Option<Vec2i>
pub const fn try_as_vec_2i_ref(&self) -> Option<&Vec2i>
pub fn try_as_vec_2i_mut(&mut self) -> Option<&mut Vec2i>
pub fn try_as_vec_2h_vec(self) -> Option<Vec<Vec2h>>
pub const fn try_as_vec_2h_vec_ref(&self) -> Option<&Vec<Vec2h>>
pub fn try_as_vec_2h_vec_mut(&mut self) -> Option<&mut Vec<Vec2h>>
pub fn try_as_vec_2f_vec(self) -> Option<Vec<Vec2f>>
pub const fn try_as_vec_2f_vec_ref(&self) -> Option<&Vec<Vec2f>>
pub fn try_as_vec_2f_vec_mut(&mut self) -> Option<&mut Vec<Vec2f>>
pub fn try_as_vec_2d_vec(self) -> Option<Vec<Vec2d>>
pub const fn try_as_vec_2d_vec_ref(&self) -> Option<&Vec<Vec2d>>
pub fn try_as_vec_2d_vec_mut(&mut self) -> Option<&mut Vec<Vec2d>>
pub fn try_as_vec_2i_vec(self) -> Option<Vec<Vec2i>>
pub const fn try_as_vec_2i_vec_ref(&self) -> Option<&Vec<Vec2i>>
pub fn try_as_vec_2i_vec_mut(&mut self) -> Option<&mut Vec<Vec2i>>
pub fn try_as_vec_3h(self) -> Option<Vec3h>
pub const fn try_as_vec_3h_ref(&self) -> Option<&Vec3h>
pub fn try_as_vec_3h_mut(&mut self) -> Option<&mut Vec3h>
pub fn try_as_vec_3f(self) -> Option<Vec3f>
pub const fn try_as_vec_3f_ref(&self) -> Option<&Vec3f>
pub fn try_as_vec_3f_mut(&mut self) -> Option<&mut Vec3f>
pub fn try_as_vec_3d(self) -> Option<Vec3d>
pub const fn try_as_vec_3d_ref(&self) -> Option<&Vec3d>
pub fn try_as_vec_3d_mut(&mut self) -> Option<&mut Vec3d>
pub fn try_as_vec_3i(self) -> Option<Vec3i>
pub const fn try_as_vec_3i_ref(&self) -> Option<&Vec3i>
pub fn try_as_vec_3i_mut(&mut self) -> Option<&mut Vec3i>
pub fn try_as_vec_3h_vec(self) -> Option<Vec<Vec3h>>
pub const fn try_as_vec_3h_vec_ref(&self) -> Option<&Vec<Vec3h>>
pub fn try_as_vec_3h_vec_mut(&mut self) -> Option<&mut Vec<Vec3h>>
pub fn try_as_vec_3f_vec(self) -> Option<Vec<Vec3f>>
pub const fn try_as_vec_3f_vec_ref(&self) -> Option<&Vec<Vec3f>>
pub fn try_as_vec_3f_vec_mut(&mut self) -> Option<&mut Vec<Vec3f>>
pub fn try_as_vec_3d_vec(self) -> Option<Vec<Vec3d>>
pub const fn try_as_vec_3d_vec_ref(&self) -> Option<&Vec<Vec3d>>
pub fn try_as_vec_3d_vec_mut(&mut self) -> Option<&mut Vec<Vec3d>>
pub fn try_as_vec_3i_vec(self) -> Option<Vec<Vec3i>>
pub const fn try_as_vec_3i_vec_ref(&self) -> Option<&Vec<Vec3i>>
pub fn try_as_vec_3i_vec_mut(&mut self) -> Option<&mut Vec<Vec3i>>
pub fn try_as_vec_4h(self) -> Option<Vec4h>
pub const fn try_as_vec_4h_ref(&self) -> Option<&Vec4h>
pub fn try_as_vec_4h_mut(&mut self) -> Option<&mut Vec4h>
pub fn try_as_vec_4f(self) -> Option<Vec4f>
pub const fn try_as_vec_4f_ref(&self) -> Option<&Vec4f>
pub fn try_as_vec_4f_mut(&mut self) -> Option<&mut Vec4f>
pub fn try_as_vec_4d(self) -> Option<Vec4d>
pub const fn try_as_vec_4d_ref(&self) -> Option<&Vec4d>
pub fn try_as_vec_4d_mut(&mut self) -> Option<&mut Vec4d>
pub fn try_as_vec_4i(self) -> Option<Vec4i>
pub const fn try_as_vec_4i_ref(&self) -> Option<&Vec4i>
pub fn try_as_vec_4i_mut(&mut self) -> Option<&mut Vec4i>
pub fn try_as_vec_4h_vec(self) -> Option<Vec<Vec4h>>
pub const fn try_as_vec_4h_vec_ref(&self) -> Option<&Vec<Vec4h>>
pub fn try_as_vec_4h_vec_mut(&mut self) -> Option<&mut Vec<Vec4h>>
pub fn try_as_vec_4f_vec(self) -> Option<Vec<Vec4f>>
pub const fn try_as_vec_4f_vec_ref(&self) -> Option<&Vec<Vec4f>>
pub fn try_as_vec_4f_vec_mut(&mut self) -> Option<&mut Vec<Vec4f>>
pub fn try_as_vec_4d_vec(self) -> Option<Vec<Vec4d>>
pub const fn try_as_vec_4d_vec_ref(&self) -> Option<&Vec<Vec4d>>
pub fn try_as_vec_4d_vec_mut(&mut self) -> Option<&mut Vec<Vec4d>>
pub fn try_as_vec_4i_vec(self) -> Option<Vec<Vec4i>>
pub const fn try_as_vec_4i_vec_ref(&self) -> Option<&Vec<Vec4i>>
pub fn try_as_vec_4i_vec_mut(&mut self) -> Option<&mut Vec<Vec4i>>
pub fn try_as_matrix_2d(self) -> Option<Mat2d>
pub const fn try_as_matrix_2d_ref(&self) -> Option<&Mat2d>
pub fn try_as_matrix_2d_mut(&mut self) -> Option<&mut Mat2d>
pub fn try_as_matrix_3d(self) -> Option<Mat3d>
pub const fn try_as_matrix_3d_ref(&self) -> Option<&Mat3d>
pub fn try_as_matrix_3d_mut(&mut self) -> Option<&mut Mat3d>
pub fn try_as_matrix_4d(self) -> Option<Matrix4d>
pub const fn try_as_matrix_4d_ref(&self) -> Option<&Matrix4d>
pub fn try_as_matrix_4d_mut(&mut self) -> Option<&mut Matrix4d>
pub fn try_as_matrix_2d_vec(self) -> Option<Vec<Mat2d>>
pub const fn try_as_matrix_2d_vec_ref(&self) -> Option<&Vec<Mat2d>>
pub fn try_as_matrix_2d_vec_mut(&mut self) -> Option<&mut Vec<Mat2d>>
pub fn try_as_matrix_3d_vec(self) -> Option<Vec<Mat3d>>
pub const fn try_as_matrix_3d_vec_ref(&self) -> Option<&Vec<Mat3d>>
pub fn try_as_matrix_3d_vec_mut(&mut self) -> Option<&mut Vec<Mat3d>>
pub fn try_as_matrix_4d_vec(self) -> Option<Vec<Matrix4d>>
pub const fn try_as_matrix_4d_vec_ref(&self) -> Option<&Vec<Matrix4d>>
pub fn try_as_matrix_4d_vec_mut(&mut self) -> Option<&mut Vec<Matrix4d>>
pub fn try_as_specifier(self) -> Option<Specifier>
pub const fn try_as_specifier_ref(&self) -> Option<&Specifier>
pub fn try_as_specifier_mut(&mut self) -> Option<&mut Specifier>
pub fn try_as_permission(self) -> Option<Permission>
pub const fn try_as_permission_ref(&self) -> Option<&Permission>
pub fn try_as_permission_mut(&mut self) -> Option<&mut Permission>
pub fn try_as_variability(self) -> Option<Variability>
pub const fn try_as_variability_ref(&self) -> Option<&Variability>
pub fn try_as_variability_mut(&mut self) -> Option<&mut Variability>
pub fn try_as_dictionary(self) -> Option<HashMap<String, Value>>
pub const fn try_as_dictionary_ref(&self) -> Option<&HashMap<String, Value>>
pub fn try_as_dictionary_mut(&mut self) -> Option<&mut HashMap<String, Value>>
pub fn try_as_token_list_op(self) -> Option<TokenListOp>
pub const fn try_as_token_list_op_ref(&self) -> Option<&TokenListOp>
pub fn try_as_token_list_op_mut(&mut self) -> Option<&mut TokenListOp>
pub fn try_as_string_list_op(self) -> Option<StringListOp>
pub const fn try_as_string_list_op_ref(&self) -> Option<&StringListOp>
pub fn try_as_string_list_op_mut(&mut self) -> Option<&mut StringListOp>
pub fn try_as_path_list_op(self) -> Option<PathListOp>
pub const fn try_as_path_list_op_ref(&self) -> Option<&PathListOp>
pub fn try_as_path_list_op_mut(&mut self) -> Option<&mut PathListOp>
pub fn try_as_reference_list_op(self) -> Option<ReferenceListOp>
pub const fn try_as_reference_list_op_ref(&self) -> Option<&ReferenceListOp>
pub fn try_as_reference_list_op_mut(&mut self) -> Option<&mut ReferenceListOp>
pub fn try_as_int_list_op(self) -> Option<IntListOp>
pub const fn try_as_int_list_op_ref(&self) -> Option<&IntListOp>
pub fn try_as_int_list_op_mut(&mut self) -> Option<&mut IntListOp>
pub fn try_as_int_64_list_op(self) -> Option<Int64ListOp>
pub const fn try_as_int_64_list_op_ref(&self) -> Option<&Int64ListOp>
pub fn try_as_int_64_list_op_mut(&mut self) -> Option<&mut Int64ListOp>
pub fn try_as_u_int_list_op(self) -> Option<UintListOp>
pub const fn try_as_u_int_list_op_ref(&self) -> Option<&UintListOp>
pub fn try_as_u_int_list_op_mut(&mut self) -> Option<&mut UintListOp>
pub fn try_as_u_int_64_list_op(self) -> Option<Uint64ListOp>
pub const fn try_as_u_int_64_list_op_ref(&self) -> Option<&Uint64ListOp>
pub fn try_as_u_int_64_list_op_mut(&mut self) -> Option<&mut Uint64ListOp>
pub fn try_as_payload_list_op(self) -> Option<PayloadListOp>
pub const fn try_as_payload_list_op_ref(&self) -> Option<&PayloadListOp>
pub fn try_as_payload_list_op_mut(&mut self) -> Option<&mut PayloadListOp>
pub fn try_as_payload(self) -> Option<Payload>
pub const fn try_as_payload_ref(&self) -> Option<&Payload>
pub fn try_as_payload_mut(&mut self) -> Option<&mut Payload>
pub fn try_as_path_vec(self) -> Option<Vec<Path>>
pub const fn try_as_path_vec_ref(&self) -> Option<&Vec<Path>>
pub fn try_as_path_vec_mut(&mut self) -> Option<&mut Vec<Path>>
pub fn try_as_relocates(self) -> Option<RelocateList>
pub const fn try_as_relocates_ref(&self) -> Option<&RelocateList>
pub fn try_as_relocates_mut(&mut self) -> Option<&mut RelocateList>
pub fn try_as_variant_selection_map(self) -> Option<HashMap<String, String>>
pub const fn try_as_variant_selection_map_ref( &self, ) -> Option<&HashMap<String, String>>
pub fn try_as_variant_selection_map_mut( &mut self, ) -> Option<&mut HashMap<String, String>>
pub fn try_as_time_samples(self) -> Option<TimeSampleMap>
pub const fn try_as_time_samples_ref(&self) -> Option<&TimeSampleMap>
pub fn try_as_time_samples_mut(&mut self) -> Option<&mut TimeSampleMap>
pub fn try_as_layer_offset_vec(self) -> Option<Vec<LayerOffset>>
pub const fn try_as_layer_offset_vec_ref(&self) -> Option<&Vec<LayerOffset>>
pub fn try_as_layer_offset_vec_mut(&mut self) -> Option<&mut Vec<LayerOffset>>
pub fn try_as_value_vec(self) -> Option<Vec<Value>>
pub const fn try_as_value_vec_ref(&self) -> Option<&Vec<Value>>
pub fn try_as_value_vec_mut(&mut self) -> Option<&mut Vec<Value>>
pub fn try_as_unregistered_value(self) -> Option<String>
pub const fn try_as_unregistered_value_ref(&self) -> Option<&String>
pub fn try_as_unregistered_value_mut(&mut self) -> Option<&mut String>
pub fn try_as_unregistered_value_list_op(self) -> Option<StringListOp>
pub const fn try_as_unregistered_value_list_op_ref( &self, ) -> Option<&StringListOp>
pub fn try_as_unregistered_value_list_op_mut( &mut self, ) -> Option<&mut StringListOp>
pub fn try_as_time_code(self) -> Option<TimeCode>
pub const fn try_as_time_code_ref(&self) -> Option<&TimeCode>
pub fn try_as_time_code_mut(&mut self) -> Option<&mut TimeCode>
pub fn try_as_time_code_vec(self) -> Option<Vec<TimeCode>>
pub const fn try_as_time_code_vec_ref(&self) -> Option<&Vec<TimeCode>>
pub fn try_as_time_code_vec_mut(&mut self) -> Option<&mut Vec<TimeCode>>
pub fn try_as_path_expression(self) -> Option<String>
pub const fn try_as_path_expression_ref(&self) -> Option<&String>
pub fn try_as_path_expression_mut(&mut self) -> Option<&mut String>
Source§impl Value
impl Value
Sourcepub fn get<T: TryFrom<Value>>(self) -> Option<T>
pub fn get<T: TryFrom<Value>>(self) -> Option<T>
Extracts the payload as T if this holds the matching variant, else
None. A typed view over the try_as_* accessors and the
TryFrom<Value> impls — e.g. value.get::<tf::Token>(). T = Value
returns the value unchanged.
Sourcepub fn has_embedded_paths(&self) -> bool
pub fn has_embedded_paths(&self) -> bool
Whether this value embeds namespace paths that remap_paths
rewrites — PathVec, PathListOp (relationship targets, attribute
connections, inheritPaths, specializes), Relocates, and
ReferenceListOp / PayloadListOp (whose internal entries target this
layer’s own namespace). The single source of truth a copy value policy
checks before remapping, so the set of path-bearing variants lives only
here.
Sourcepub fn remap_paths(&self, remap: impl Fn(&Path) -> Path) -> Value
pub fn remap_paths(&self, remap: impl Fn(&Path) -> Path) -> Value
Returns a copy of this value with every embedded namespace path rewritten
through remap. Paths live in PathVec, PathListOp (relationship
targets, attribute connections, inheritPaths, specializes),
Relocates (source/target pairs), and the prim paths of internal
(same-layer) ReferenceListOp / PayloadListOp entries. An external
reference or payload carries its prim path in the referenced layer’s
namespace, and an empty prim path is the defaultPrim selector — both
are left untouched; every other value kind is cloned unchanged.
The path-rewriting core behind copy_spec,
exposed so callers building a custom copy value policy (flatten, namespace
editing, rename) can remap paths with their own mapping rather than the
default root-to-root prefix swap.
Sourcepub fn filter_map_paths(&self, remap: impl Fn(&Path) -> Option<Path>) -> Value
pub fn filter_map_paths(&self, remap: impl Fn(&Path) -> Option<Path>) -> Value
Returns a copy of this value with every embedded namespace path mapped
through remap, dropping any path it maps to None. The dropping form
of remap_paths: namespace-edit deletion fixup maps
the targets/connections/internal references that point at a removed object
to None so the entries vanish, while moves map to Some(new_path).
A PathVec element or list-op item that maps to None is removed. An
external reference or payload (whose prim path lives in the referenced
layer’s namespace) is never offered to remap and is always kept; a
relocate pair is dropped when its source maps to None.
Source§impl Value
impl Value
pub fn vec2f(x: f32, y: f32) -> Self
pub fn vec3f(x: f32, y: f32, z: f32) -> Self
pub fn vec4f(x: f32, y: f32, z: f32, w: f32) -> Self
pub fn vec2d(x: f64, y: f64) -> Self
pub fn vec3d(x: f64, y: f64, z: f64) -> Self
pub fn vec4d(x: f64, y: f64, z: f64, w: f64) -> Self
pub fn vec2i(x: i32, y: i32) -> Self
pub fn vec3i(x: i32, y: i32, z: i32) -> Self
pub fn vec4i(x: i32, y: i32, z: i32, w: i32) -> Self
pub fn vec2h(x: f16, y: f16) -> Self
pub fn vec3h(x: f16, y: f16, z: f16) -> Self
pub fn vec4h(x: f16, y: f16, z: f16, w: f16) -> Self
pub fn quatf(w: f32, x: f32, y: f32, z: f32) -> Self
pub fn quatd(w: f64, x: f64, y: f64, z: f64) -> Self
pub fn quath(w: f16, x: f16, y: f16, z: f16) -> Self
Sourcepub fn token(name: impl Into<Token>) -> Self
pub fn token(name: impl Into<Token>) -> Self
Builds a Value::Token from any string-like value, so callers need not
name Token at the construction site (Value::token("Mesh")).
Sourcepub fn token_vec(items: impl IntoIterator<Item = impl Into<Token>>) -> Self
pub fn token_vec(items: impl IntoIterator<Item = impl Into<Token>>) -> Self
Builds a Value::TokenVec from any iterator of string-like items —
the counterpart of Value::token for name lists such as
primChildren and allowedTokens.
Sourcepub fn as_str(&self) -> Option<&str>
pub fn as_str(&self) -> Option<&str>
Borrows the inner string of a string-like scalar — asset, string,
or token — and None for any other variant.
An asset path may be authored as a plain string or token, so reading
one coerces across all three (the borrowing counterpart to the owned
TryFrom<Value> for String).
Sourcepub fn cast<T: FromValueCast>(self) -> Result<T, CastError>
pub fn cast<T: FromValueCast>(self) -> Result<T, CastError>
Coerces this value to T through the registered casts, mirroring C++
VtValue::Cast: numeric scalars cross-convert (range-checked), string
↔ token, and same-dimension vectors/quaternions change precision.
Unlike T::try_from / Attribute::get,
which require the exact held variant, cast is the coercing tier — read
the raw value and cast when the authored type may differ from the wanted
one: attr.get::<Value>()?.map(|v| v.cast::<f32>()).transpose()?.
Trait Implementations§
Source§impl<'a> From<&'a str> for Value
Convert from &str to Value.
impl<'a> From<&'a str> for Value
Convert from &str to Value.
Used a lot in text parser since all tokens are basically strings.