Struct cradle::Stdin[][src]

pub struct Stdin<T: AsRef<[u8]>>(pub T);
Expand description

See the Input implementation for Stdin below.

Trait Implementations

Writes the given byte slice to the child’s standard input.

use cradle::*;

let StdoutUntrimmed(output) = cmd!("sort", Stdin("foo\nbar\n"));
assert_eq!(output, "bar\nfoo\n");

If Stdin is used multiple times, all given bytes slices will be written to the child’s standard input in order.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.