Skip to content

Commit ed4c211

Browse files
committed
Add information to valid info fields
1 parent 501c097 commit ed4c211

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/input.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,18 @@ use crate::{
2121
/// ```rust
2222
#[doc = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/snippets/input/using_sample.rs"))]
2323
/// ```
24+
///
25+
/// In addition to the data itself, each instance contains metadata which can be
26+
/// accessed with [`Sample::get_info`] and related methods.
27+
/// The list of available info fields include, but is not limited to:
28+
///
29+
/// - `valid_data`: A boolean indicating whether the sample contains valid data.
30+
/// - `source_timestamp`: A string representing the source timestamp of the sample.
31+
/// - `reception_timestamp`: A string representing the reception timestamp of the sample.
32+
/// - `instance_state`: A string representing the instance state of the sample.
33+
/// - `view_state`: A string representing the view state of the sample.
34+
/// - `sample_state`: A string representing the sample state of the sample.
35+
/// - `identity`: A string representing the identity of the sample publisher.
2436
#[derive(Debug)]
2537
pub struct Sample<'a> {
2638
/// The index of the sample within the [`Input`]'s samples cache.

0 commit comments

Comments
 (0)