pub struct FrcTimestampedValue {
pub timestamp: FrcTimestamp,
pub value: FrcValue,
}Expand description
An FrcValue with a FrcTimestamp attached,
important for passing to logging systems
Fields§
§timestamp: FrcTimestampThe timestamp of the value, typically the uptime of the robot if running on the robot and the unix epoch if running on desktop (non sim)
value: FrcValueThe value
Implementations§
Source§impl FrcTimestampedValue
impl FrcTimestampedValue
Sourcepub const fn new(timestamp: FrcTimestamp, value: FrcValue) -> Self
pub const fn new(timestamp: FrcTimestamp, value: FrcValue) -> Self
Creates a new timestamped value
Sourcepub const fn is_after_timestamp(&self, timestamp: FrcTimestamp) -> bool
pub const fn is_after_timestamp(&self, timestamp: FrcTimestamp) -> bool
Checks if the timestamp is after the given timestamp
Sourcepub const fn is_after_other(&self, other: &Self) -> bool
pub const fn is_after_other(&self, other: &Self) -> bool
Checks if the timestamp is after the given timestamped value
Sourcepub const fn is_before_timestamp(&self, timestamp: FrcTimestamp) -> bool
pub const fn is_before_timestamp(&self, timestamp: FrcTimestamp) -> bool
Checks if the timestamp is before the given timestamp
Sourcepub const fn is_before_other(&self, other: &Self) -> bool
pub const fn is_before_other(&self, other: &Self) -> bool
Checks if the timestamp is before the given timestamped value
Trait Implementations§
Source§impl Clone for FrcTimestampedValue
impl Clone for FrcTimestampedValue
Source§fn clone(&self) -> FrcTimestampedValue
fn clone(&self) -> FrcTimestampedValue
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 FrcTimestampedValue
impl Debug for FrcTimestampedValue
Source§impl Display for FrcTimestampedValue
impl Display for FrcTimestampedValue
Source§impl From<FrcTimestampedValue> for FrcValue
impl From<FrcTimestampedValue> for FrcValue
Source§fn from(v: FrcTimestampedValue) -> Self
fn from(v: FrcTimestampedValue) -> Self
Converts to this type from the input type.
Source§impl Hash for FrcTimestampedValue
impl Hash for FrcTimestampedValue
Source§impl PartialEq for FrcTimestampedValue
impl PartialEq for FrcTimestampedValue
Source§fn eq(&self, other: &FrcTimestampedValue) -> bool
fn eq(&self, other: &FrcTimestampedValue) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for FrcTimestampedValue
Auto Trait Implementations§
impl Freeze for FrcTimestampedValue
impl RefUnwindSafe for FrcTimestampedValue
impl Send for FrcTimestampedValue
impl Sync for FrcTimestampedValue
impl Unpin for FrcTimestampedValue
impl UnsafeUnpin for FrcTimestampedValue
impl UnwindSafe for FrcTimestampedValue
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoFrcValue for T
impl<T> IntoFrcValue for T
fn into_frc_value(self) -> FrcValue
impl<T> Scalar for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.