pub enum ValueKind {
Bool,
Integer,
Number,
Text,
Vec2,
Vec3,
Quaternion,
Color,
Reference,
}Expand description
A scene value’s type, including its built-in validation constraints.
Numbers must be finite; vector and quaternion elements are finite f32s.
Quaternions must have squared length greater than 1e-20 (they need not be
normalized). Text is UTF-8, at most MAX_STRING bytes, and excludes NUL.
Colors have four u8 channels. References must resolve to a concrete node.
Variants§
Implementations§
Source§impl ValueKind
impl ValueKind
Sourcepub const fn keyword(self) -> &'static str
pub const fn keyword(self) -> &'static str
The type keyword accepted by the scene text parser. These names also
identify types in Schema::write_json; they are not Rust debug names.
use ferravex_play::authoring::ValueKind;
assert_eq!(ValueKind::Integer.keyword(), "int");
assert_eq!(ValueKind::Quaternion.keyword(), "quat");
assert_eq!(ValueKind::Color.keyword(), "rgba");
assert_eq!(ValueKind::Reference.keyword(), "ref");Trait Implementations§
impl Copy for ValueKind
impl Eq for ValueKind
impl StructuralPartialEq for ValueKind
Auto Trait Implementations§
impl Freeze for ValueKind
impl RefUnwindSafe for ValueKind
impl Send for ValueKind
impl Sync for ValueKind
impl Unpin for ValueKind
impl UnwindSafe for ValueKind
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