pub struct Var { /* private fields */ }Expand description
Var is a handle to a variable or telemetry data point.
Var’s are obtained via the find_var() method on Session, and are then valid for the lifetime of that Session. They can only be used with the Session that generated them. In addition the metadata available from Var, Var is also used as a key to read the current value for the item.
Implementations§
Source§impl Var
impl Var
pub fn name(&self) -> &str
pub fn desc(&self) -> &str
pub fn unit(&self) -> &str
Sourcepub fn count(&self) -> usize
pub fn count(&self) -> usize
returns the count. This indicates how many instances of the datapoint value are associated with this variable. Typically its one, but there is a small subset of points that have more, typically 64 (i.e. one per driver). Values for Var’s with a count > 1 are returned as slices of the relevent type
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Var
impl RefUnwindSafe for Var
impl Send for Var
impl Sync for Var
impl Unpin for Var
impl UnwindSafe for Var
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