Skip to main content

Io

Struct Io 

Source
#[non_exhaustive]
pub struct Io<R: Read, W: Write, E: Write> { pub stdin: R, pub stdout: W, pub stderr: E, }
Expand description

Explicit I/O handles for run.

The binary’s main wraps stdin().lock(), stdout().lock(), and stderr().lock(); tests use byte slices and Vec<u8> writers. Holding the three together avoids threading three generics through the call sites.

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§stdin: R

Standard input source (the records to cluster).

§stdout: W

Standard output sink (the rendered envelope).

§stderr: E

Standard error sink (--verbose provenance + skip warnings).

Implementations§

Source§

impl<R: Read, W: Write, E: Write> Io<R, W, E>

Source

pub fn new(stdin: R, stdout: W, stderr: E) -> Self

Construct explicit handles for one run invocation.

Auto Trait Implementations§

§

impl<R, W, E> Freeze for Io<R, W, E>
where R: Freeze, W: Freeze, E: Freeze,

§

impl<R, W, E> RefUnwindSafe for Io<R, W, E>

§

impl<R, W, E> Send for Io<R, W, E>
where R: Send, W: Send, E: Send,

§

impl<R, W, E> Sync for Io<R, W, E>
where R: Sync, W: Sync, E: Sync,

§

impl<R, W, E> Unpin for Io<R, W, E>
where R: Unpin, W: Unpin, E: Unpin,

§

impl<R, W, E> UnsafeUnpin for Io<R, W, E>

§

impl<R, W, E> UnwindSafe for Io<R, W, E>
where R: UnwindSafe, W: UnwindSafe, E: UnwindSafe,

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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.