pub enum InspectorValue {
Bool(bool),
Int(i64),
Float(f64),
String(String),
Vec2([f32; 2]),
Vec3([f32; 3]),
Vec4([f32; 4]),
Color([f32; 4]),
List(Vec<InspectorValue>),
Map(HashMap<String, InspectorValue>),
Enum {
variant: String,
variants: Vec<String>,
},
}Expand description
A dynamically-typed value for use in the inspector UI.
Variants§
Bool(bool)
Int(i64)
Float(f64)
String(String)
Vec2([f32; 2])
Vec3([f32; 3])
Vec4([f32; 4])
Color([f32; 4])
RGBA color in 0–1 range.
List(Vec<InspectorValue>)
Map(HashMap<String, InspectorValue>)
Enum
Implementations§
Source§impl InspectorValue
impl InspectorValue
Sourcepub fn is_numeric(&self) -> bool
pub fn is_numeric(&self) -> bool
Returns true if this value is a numeric type.
Trait Implementations§
Source§impl Clone for InspectorValue
impl Clone for InspectorValue
Source§fn clone(&self) -> InspectorValue
fn clone(&self) -> InspectorValue
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for InspectorValue
impl Debug for InspectorValue
Source§impl Default for InspectorValue
impl Default for InspectorValue
Source§impl From<&str> for InspectorValue
impl From<&str> for InspectorValue
Source§impl From<String> for InspectorValue
impl From<String> for InspectorValue
Source§impl From<bool> for InspectorValue
impl From<bool> for InspectorValue
Source§impl From<f32> for InspectorValue
impl From<f32> for InspectorValue
Source§impl From<f64> for InspectorValue
impl From<f64> for InspectorValue
Source§impl From<i32> for InspectorValue
impl From<i32> for InspectorValue
Source§impl From<i64> for InspectorValue
impl From<i64> for InspectorValue
Source§impl PartialEq for InspectorValue
impl PartialEq for InspectorValue
impl StructuralPartialEq for InspectorValue
Auto Trait Implementations§
impl Freeze for InspectorValue
impl RefUnwindSafe for InspectorValue
impl Send for InspectorValue
impl Sync for InspectorValue
impl Unpin for InspectorValue
impl UnsafeUnpin for InspectorValue
impl UnwindSafe for InspectorValue
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.