pub struct ListOutput {
pub name: String,
pub value: Value,
pub object: Option<String>,
pub fields: Option<HashMap<String, Value>>,
}Expand description
Output parameters for the List method.
Fields§
§name: String§value: Value§object: Option<String>§fields: Option<HashMap<String, Value>>Implementations§
Source§impl ListOutput
impl ListOutput
Sourcepub fn name_suffix(&self) -> &str
pub fn name_suffix(&self) -> &str
Returns the name of the metric
Sourcepub fn object_name(&self) -> String
pub fn object_name(&self) -> String
Returns the object name or empty string if not present
Sourcepub fn value_as_string(&self) -> &str
pub fn value_as_string(&self) -> &str
Returns the string value. Caller must validate value is a string first.
Sourcepub fn value_as_int(&self) -> i64
pub fn value_as_int(&self) -> i64
Returns the int value. Caller must validate value is an integer first.
Sourcepub fn value_as_bool(&self) -> bool
pub fn value_as_bool(&self) -> bool
Returns the bool value. Caller must validate value is a bool first.
Sourcepub fn get_field_as_str(&self, field_name: &str) -> Option<&str>
pub fn get_field_as_str(&self, field_name: &str) -> Option<&str>
Extract a string field value from the fields map by field name
Trait Implementations§
Source§impl Clone for ListOutput
impl Clone for ListOutput
Source§fn clone(&self) -> ListOutput
fn clone(&self) -> ListOutput
Returns a duplicate of the value. Read more
1.0.0 · 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 ListOutput
impl Debug for ListOutput
Source§impl<'de> Deserialize<'de> for ListOutput
impl<'de> Deserialize<'de> for ListOutput
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
Source§impl PartialEq for ListOutput
impl PartialEq for ListOutput
Source§impl Serialize for ListOutput
impl Serialize for ListOutput
impl StructuralPartialEq for ListOutput
Auto Trait Implementations§
impl Freeze for ListOutput
impl RefUnwindSafe for ListOutput
impl Send for ListOutput
impl Sync for ListOutput
impl Unpin for ListOutput
impl UnwindSafe for ListOutput
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