Add comments to Union.
This commit is contained in:
parent
f498dc81a3
commit
61a01ea957
@ -152,25 +152,38 @@ pub struct Dynamic(pub(crate) Union);
|
|||||||
///
|
///
|
||||||
/// Most variants are boxed to reduce the size.
|
/// Most variants are boxed to reduce the size.
|
||||||
pub enum Union {
|
pub enum Union {
|
||||||
|
/// The Unit value - ().
|
||||||
Unit((), AccessMode),
|
Unit((), AccessMode),
|
||||||
|
/// A boolean value.
|
||||||
Bool(bool, AccessMode),
|
Bool(bool, AccessMode),
|
||||||
|
/// An [`ImmutableString`] value.
|
||||||
Str(ImmutableString, AccessMode),
|
Str(ImmutableString, AccessMode),
|
||||||
|
/// A character value.
|
||||||
Char(char, AccessMode),
|
Char(char, AccessMode),
|
||||||
|
/// An integer value.
|
||||||
Int(INT, AccessMode),
|
Int(INT, AccessMode),
|
||||||
|
/// A floating-point value.
|
||||||
#[cfg(not(feature = "no_float"))]
|
#[cfg(not(feature = "no_float"))]
|
||||||
Float(FloatWrapper, AccessMode),
|
Float(FloatWrapper, AccessMode),
|
||||||
|
/// A fixed-precision decimal value.
|
||||||
#[cfg(feature = "decimal")]
|
#[cfg(feature = "decimal")]
|
||||||
Decimal(Box<Decimal>, AccessMode),
|
Decimal(Box<Decimal>, AccessMode),
|
||||||
|
/// An array value.
|
||||||
#[cfg(not(feature = "no_index"))]
|
#[cfg(not(feature = "no_index"))]
|
||||||
Array(Box<Array>, AccessMode),
|
Array(Box<Array>, AccessMode),
|
||||||
|
/// An object map value.
|
||||||
#[cfg(not(feature = "no_object"))]
|
#[cfg(not(feature = "no_object"))]
|
||||||
Map(Box<Map>, AccessMode),
|
Map(Box<Map>, AccessMode),
|
||||||
|
/// A function pointer.
|
||||||
FnPtr(Box<FnPtr>, AccessMode),
|
FnPtr(Box<FnPtr>, AccessMode),
|
||||||
|
/// A timestamp value.
|
||||||
#[cfg(not(feature = "no_std"))]
|
#[cfg(not(feature = "no_std"))]
|
||||||
TimeStamp(Box<Instant>, AccessMode),
|
TimeStamp(Box<Instant>, AccessMode),
|
||||||
|
|
||||||
|
/// Any type as a trait object.
|
||||||
Variant(Box<Box<dyn Variant>>, AccessMode),
|
Variant(Box<Box<dyn Variant>>, AccessMode),
|
||||||
|
|
||||||
|
/// A _shared_ value of any type.
|
||||||
#[cfg(not(feature = "no_closure"))]
|
#[cfg(not(feature = "no_closure"))]
|
||||||
Shared(crate::Shared<crate::Locked<Dynamic>>, AccessMode),
|
Shared(crate::Shared<crate::Locked<Dynamic>>, AccessMode),
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user