Struct heartbeats_simple::Heartbeat
[−]
[src]
pub struct Heartbeat { pub hb: HeartbeatContext, pub hbr: Vec<HeartbeatRecord>, pub log: Option<File>, }
Contains the Heartbeat and its window data buffer.
Fields
hb: HeartbeatContext
hbr: Vec<HeartbeatRecord>
log: Option<File>
Methods
impl Heartbeat
[src]
fn new(
window_size: usize,
hwc_callback: HeartbeatWindowComplete,
log: Option<File>
) -> Result<Heartbeat, &'static str>
[src]
window_size: usize,
hwc_callback: HeartbeatWindowComplete,
log: Option<File>
) -> Result<Heartbeat, &'static str>
Allocate and initialize a new Heartbeat
.
fn heartbeat(&mut self, tag: u64, work: u64, start_time: u64, end_time: u64)
[src]
Issue a heartbeat
fn log_to_buffer_index(&mut self) -> Result<()>
[src]
Rust-only function that logs the buffer (up to buffer_index) to a file.