Skip to main content

Fifo

Struct Fifo 

Source
pub struct Fifo { /* private fields */ }
Expand description

A fresh scene-local FIFO opened before engine spawn. Its dedicated reader drains continuously, preserving partial lines; no stale file can satisfy a later scene’s wait. Drop ends the reader without waiting for engine exit.

Implementations§

Source§

impl Fifo

Source

pub fn new(scene: &Scene, name: &str) -> Result<Self>

Source

pub fn path(&self) -> &Path

Source

pub fn line(&self) -> String

Source

pub fn line_while(&self, scene: &mut Scene, live: Live) -> Result<String>

Wait for a trace while also observing child death. An outside SIGKILL returns to scene arbitration immediately instead of spending the guard waiting on a FIFO whose read/write keeper intentionally prevents EOF. A line the child wrote before it ended is still returned: the reader polls, so it can lag an exit, and calling the FIFO done then lost a stopped engine’s last trace (URS-33).

§Panics

When no line arrives before the testkit deadlock guard.

Trait Implementations§

Source§

impl Drop for Fifo

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

fn pin_drop(self: Pin<&mut Self>)

🔬This is a nightly-only experimental API. (pin_ergonomics)
Execute the destructor for this type, but different to Drop::drop, it requires self to be pinned. Read more

Auto Trait Implementations§

§

impl !RefUnwindSafe for Fifo

§

impl !Sync for Fifo

§

impl !UnwindSafe for Fifo

§

impl Forget for Fifo

§

impl Freeze for Fifo

§

impl Move for Fifo

§

impl Send for Fifo

§

impl Unpin for Fifo

§

impl UnsafeUnpin for Fifo

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.