pub enum Handle {
Stdout,
Stdin(Arc<Mutex<ChildStdin>>),
Collect(Arc<Mutex<Vec<Output<Value>>>>),
}Expand description
Destination for super::Output::emit.
Arc<tokio::sync::Mutex<_>> on the non-unit variants lets the
handle be cloned cheaply across the command tree’s call chain and
guarantees concurrent emits serialize correctly. tokio::sync::Mutex
(not std::sync::Mutex) because we hold the guard across .await
boundaries during async writes, which would deadlock with std’s.
Variants§
Stdout
Write each line to this process’s stdout; mirror fatal
Output::Error lines to stderr.
Stdin(Arc<Mutex<ChildStdin>>)
Write each line to a child process’s stdin.
Collect(Arc<Mutex<Vec<Output<Value>>>>)
Push each emitted Output<T> (reserialized as Output<Value>
for a uniform storage type) into a shared vector.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Handle
impl !RefUnwindSafe for Handle
impl Send for Handle
impl Sync for Handle
impl Unpin for Handle
impl UnsafeUnpin for Handle
impl !UnwindSafe for Handle
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more