pub enum FieldValue {
Bool(bool),
I32(i32),
I64(i64),
U32(u32),
U64(u64),
F32(f32),
String(Vec<u8>),
Vector2([f32; 2]),
Vector3([f32; 3]),
Vector4([f32; 4]),
QAngle([f32; 3]),
}Expand description
Represents a decoded entity field value from the demo’s entity system.
Each variant corresponds to a Source 2 network field type. The variant chosen at runtime depends on the field’s serializer metadata.
Variants§
Bool(bool)
I32(i32)
I64(i64)
U32(u32)
U64(u64)
F32(f32)
String(Vec<u8>)
Raw byte string. Stored as Vec<u8> rather than std::string::String
because some Source 2 strings are not guaranteed to be valid UTF-8.
Vector2([f32; 2])
Vector3([f32; 3])
Vector4([f32; 4])
QAngle([f32; 3])
Euler angles (pitch, yaw, roll) in degrees.
Trait Implementations§
Source§impl Clone for FieldValue
impl Clone for FieldValue
Source§fn clone(&self) -> FieldValue
fn clone(&self) -> FieldValue
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 FieldValue
impl Debug for FieldValue
Source§impl Display for FieldValue
impl Display for FieldValue
Source§impl Serialize for FieldValue
impl Serialize for FieldValue
Source§impl TryFrom<FieldValue> for [f32; 2]
impl TryFrom<FieldValue> for [f32; 2]
Source§type Error = FieldValueConversionError
type Error = FieldValueConversionError
The type returned in the event of a conversion error.
Source§impl TryFrom<FieldValue> for [f32; 3]
impl TryFrom<FieldValue> for [f32; 3]
Source§type Error = FieldValueConversionError
type Error = FieldValueConversionError
The type returned in the event of a conversion error.
Source§impl TryFrom<FieldValue> for [f32; 4]
impl TryFrom<FieldValue> for [f32; 4]
Source§type Error = FieldValueConversionError
type Error = FieldValueConversionError
The type returned in the event of a conversion error.
Source§impl TryFrom<FieldValue> for bool
impl TryFrom<FieldValue> for bool
Source§type Error = FieldValueConversionError
type Error = FieldValueConversionError
The type returned in the event of a conversion error.
Source§impl TryFrom<FieldValue> for f32
impl TryFrom<FieldValue> for f32
Source§type Error = FieldValueConversionError
type Error = FieldValueConversionError
The type returned in the event of a conversion error.
Source§impl TryFrom<FieldValue> for i16
impl TryFrom<FieldValue> for i16
Source§type Error = FieldValueConversionError
type Error = FieldValueConversionError
The type returned in the event of a conversion error.
Source§impl TryFrom<FieldValue> for i32
impl TryFrom<FieldValue> for i32
Source§type Error = FieldValueConversionError
type Error = FieldValueConversionError
The type returned in the event of a conversion error.
Source§impl TryFrom<FieldValue> for i64
impl TryFrom<FieldValue> for i64
Source§type Error = FieldValueConversionError
type Error = FieldValueConversionError
The type returned in the event of a conversion error.
Source§impl TryFrom<FieldValue> for i8
impl TryFrom<FieldValue> for i8
Source§type Error = FieldValueConversionError
type Error = FieldValueConversionError
The type returned in the event of a conversion error.
Source§impl TryFrom<FieldValue> for u16
impl TryFrom<FieldValue> for u16
Source§type Error = FieldValueConversionError
type Error = FieldValueConversionError
The type returned in the event of a conversion error.
Source§impl TryFrom<FieldValue> for u32
impl TryFrom<FieldValue> for u32
Source§type Error = FieldValueConversionError
type Error = FieldValueConversionError
The type returned in the event of a conversion error.
Source§impl TryFrom<FieldValue> for u64
impl TryFrom<FieldValue> for u64
Source§type Error = FieldValueConversionError
type Error = FieldValueConversionError
The type returned in the event of a conversion error.
Source§impl TryFrom<FieldValue> for u8
impl TryFrom<FieldValue> for u8
Source§type Error = FieldValueConversionError
type Error = FieldValueConversionError
The type returned in the event of a conversion error.
Auto Trait Implementations§
impl Freeze for FieldValue
impl RefUnwindSafe for FieldValue
impl Send for FieldValue
impl Sync for FieldValue
impl Unpin for FieldValue
impl UnsafeUnpin for FieldValue
impl UnwindSafe for FieldValue
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