#[non_exhaustive]pub enum ConstValue<'a> {
}Expand description
A decoded constant value from a VAR_CONST variable record or custom data.
Values are either packed inline in the OffsValue field (small
positive integers) or stored in the custom data segment.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Empty
No value / empty (VT_EMPTY, 0).
Null
Null (VT_NULL, 1).
I2(i16)
A 16-bit signed integer (VT_I2, 2).
I4(i32)
A 32-bit signed integer (VT_I4, 3).
R4(f32)
A 32-bit float (VT_R4, 4).
R8(f64)
A 64-bit float (VT_R8, 5).
Cy(i64)
A currency value (VT_CY, 6) stored as a 64-bit integer scaled by 10000.
Date(f64)
A date (VT_DATE, 7) stored as a 64-bit float (OLE Automation date).
Bstr(&'a [u8])
A byte-string (VT_BSTR, 8), borrowed from the file data.
Error(i32)
An OLE error code (VT_ERROR, 10).
Bool(bool)
A boolean (VT_BOOL, 11).
I1(i8)
A signed byte (VT_I1, 16).
UI1(u8)
An unsigned byte (VT_UI1, 17).
UI2(u16)
An unsigned 16-bit integer (VT_UI2, 18).
UI4(u32)
An unsigned 32-bit integer (VT_UI4, 19).
I8(i64)
A 64-bit signed integer (VT_I8, 20).
UI8(u64)
A 64-bit unsigned integer (VT_UI8, 21).
Int(i32)
A signed integer (VT_INT, 22).
UInt(u32)
An unsigned integer (VT_UINT, 23).
Void
Void (VT_VOID, 24).
Hresult(i32)
An HRESULT (VT_HRESULT, 25).
Decimal(&'a [u8])
A decimal value (VT_DECIMAL, 14), raw 16 bytes.
Filetime(u64)
A FILETIME value (VT_FILETIME, 64).
Raw
A value whose VARTYPE code has no dedicated variant above.
The vt field is the 16-bit VARTYPE code (e.g. VT_DISPATCH = 9,
VT_VARIANT = 12). The bits field is the first 4 bytes of the
value payload; for wider types the remaining bytes are not captured.
Trait Implementations§
Source§impl<'a> Clone for ConstValue<'a>
impl<'a> Clone for ConstValue<'a>
Source§fn clone(&self) -> ConstValue<'a>
fn clone(&self) -> ConstValue<'a>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more