[][src]Struct iracing::telemetry::Blocking

pub struct Blocking { /* fields omitted */ }

Blocking telemetry interface

Calling sample() on a Blocking interface will block until a new telemetry sample is made available.

Implementations

impl Blocking[src]

pub fn new(location: *const c_void, head: Header) -> Result<Self>[src]

pub fn close(&self) -> Result<()>[src]

pub fn sample(&self, timeout: Duration) -> Result<Sample, Box<dyn Error>>[src]

Sample Telemetry Data

Waits for new telemetry data up to timeout and returns a safe copy of the telemetry data. Returns an error on timeout or underlying system error.

Examples

use iracing::Connection;
use std::time::Duration;
 
let sampler = Connection::new()?.blocking()?;
let sample = sampler.get(Duration::from_millis(50))?;

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.