pub type LogsProperty = Property<LogsField>;
Expand description
A diagnostics hierarchy property keyed by LogsField
.
Aliased Type§
enum LogsProperty {
String(LogsField, String),
Bytes(LogsField, Vec<u8>),
Int(LogsField, i64),
Uint(LogsField, u64),
Double(LogsField, f64),
Bool(LogsField, bool),
DoubleArray(LogsField, ArrayContent<f64>),
IntArray(LogsField, ArrayContent<i64>),
UintArray(LogsField, ArrayContent<u64>),
StringList(LogsField, Vec<String>),
}
Variants§
String(LogsField, String)
The value is a string.
Bytes(LogsField, Vec<u8>)
The value is a bytes vector.
Int(LogsField, i64)
The value is an integer.
Uint(LogsField, u64)
The value is an unsigned integer.
Double(LogsField, f64)
The value is a double.
Bool(LogsField, bool)
The value is a boolean.
DoubleArray(LogsField, ArrayContent<f64>)
The value is a double array.
IntArray(LogsField, ArrayContent<i64>)
The value is an integer array.
UintArray(LogsField, ArrayContent<u64>)
The value is an unsigned integer array.
StringList(LogsField, Vec<String>)
The value is a list of strings.
Implementations
§impl<K> Property<K>
impl<K> Property<K>
pub fn discriminant_name(&self) -> &'static str
pub fn discriminant_name(&self) -> &'static str
Returns a string indicating which variant of property this is, useful for printing debug values.
pub fn number_as_int(&self) -> Option<i64>
pub fn number_as_int(&self) -> Option<i64>
Return a a numeric property as a signed integer. Useful for having a single function to call when a property has been passed through JSON, potentially losing its original signedness.
Note: unsigned integers larger than isize::MAX
will be returned as None
. If you expect
values that high, consider calling Property::int()
and Property::uint()
directly.
§impl<Key> Property<Key>
impl<Key> Property<Key>
§impl<Key> Property<Key>
impl<Key> Property<Key>
pub fn string(&self) -> Option<&str>
pub fn string(&self) -> Option<&str>
Returns the String value or None
if the property isn’t of that type
pub fn bytes(&self) -> Option<&[u8]>
pub fn bytes(&self) -> Option<&[u8]>
Returns the Bytes value or None
if the property isn’t of that type
pub fn double_array(&self) -> Option<&ArrayContent<f64>>
pub fn double_array(&self) -> Option<&ArrayContent<f64>>
Returns the DoubleArray value or None
if the property isn’t of that type
pub fn int_array(&self) -> Option<&ArrayContent<i64>>
pub fn int_array(&self) -> Option<&ArrayContent<i64>>
Returns the IntArray value or None
if the property isn’t of that type
pub fn uint_array(&self) -> Option<&ArrayContent<u64>>
pub fn uint_array(&self) -> Option<&ArrayContent<u64>>
Returns the UintArray value or None
if the property isn’t of that type
pub fn string_list(&self) -> Option<&[String]>
pub fn string_list(&self) -> Option<&[String]>
Returns the StringList value or None
if the property isn’t of that type