pub enum Parameter {
Boolean(bool),
Date(u64),
Duration(u64),
Link {
linktext: String,
href: String,
},
Number(Number),
Percentage(u8),
Text(String),
}
Expand description
Describes the value for a Data
field in a Report
.
Variants§
Boolean(bool)
The value will be displayed as ‘Yes’ or ‘No’.
Date(u64)
The value is in the form of a Unix timestamp (milliseconds) and will be displayed as a relative date if the date is less than one week ago, otherwise as an absolute date.
Duration(u64)
The value is a duration in milliseconds and will be displayed in a human readable duration format.
Link
The value will be displayed as a clickable link with the text
linktext
.
Number(Number)
The value is a JSON number and large numbers will be displayed in a human readable format (e.g. 14.3k).
Percentage(u8)
The value is a number between 0 and 100 and will be displayed with a percentage sign.
Text(String)
The value is text that will be displayed as-is.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Parameter
impl<'de> Deserialize<'de> for Parameter
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Parameter
Auto Trait Implementations§
impl Freeze for Parameter
impl RefUnwindSafe for Parameter
impl Send for Parameter
impl Sync for Parameter
impl Unpin for Parameter
impl UnwindSafe for Parameter
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