pub struct Record {
pub record_id: String,
pub meta: Option<Meta>,
pub components: Option<Vec<Component>>,
pub start_time: Option<DateTime<Utc>>,
pub stop_time: Option<DateTime<Utc>>,
pub runtime: Option<i64>,
}
Expand description
A Record
represents a single accountable unit.
Records can be sent to and received from Auditor with the AuditorClient
.
When initially inserting a record in Auditor, the record is represented as RecordAdd
.
The stop_time
can be updated at a later time by pushing a RecordUpdate
to Auditor.
Records that are retrieved from Auditor are returned as Record
.
§Example
Retrieve all records from Auditor:
// Create client by using the builder
let client = AuditorClientBuilder::new()
.address(&"localhost", 8000)
.timeout(20)
.build()?;
// Get all records
let records = client.get();
Fields§
§record_id: String
Unique identifier of the record.
meta: Option<Meta>
Meta information, a collection of key value pairs in the form of String
-> Vec<String>
.
components: Option<Vec<Component>>
List of components that are accounted for.
start_time: Option<DateTime<Utc>>
Start time of the record.
stop_time: Option<DateTime<Utc>>
Stop time of the record.
runtime: Option<i64>
Runtime of the record, i.e. the difference between stop and start time.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Record
impl<'de> Deserialize<'de> for Record
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 Ord for Record
impl Ord for Record
source§impl PartialEq for Record
impl PartialEq for Record
source§impl PartialOrd for Record
impl PartialOrd for Record
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl TryFrom<Record> for RecordUpdate
impl TryFrom<Record> for RecordUpdate
impl Eq for Record
impl StructuralPartialEq for Record
Auto Trait Implementations§
impl Freeze for Record
impl RefUnwindSafe for Record
impl Send for Record
impl Sync for Record
impl Unpin for Record
impl UnwindSafe for Record
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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<T> FutureExt for T
impl<T> FutureExt for T
source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more