diff --git a/src/input/child.rs b/src/input/child.rs index d63fa4fff..1a2ccb005 100644 --- a/src/input/child.rs +++ b/src/input/child.rs @@ -20,7 +20,15 @@ use tracing::debug; #[derive(Debug)] pub struct ChildContainer(Vec); -pub(crate) fn children_to_reader(children: Vec) -> Reader { +impl ChildContainer { + /// Create a new [`ChildContainer`] from a child process + pub fn new(children: Vec) -> Self { + Self(children) + } +} + +/// Create a [`Reader`] from a child process +pub fn children_to_reader(children: Vec) -> Reader { Reader::Pipe(BufReader::with_capacity( STEREO_FRAME_SIZE * mem::size_of::() * CHILD_BUFFER_LEN, ChildContainer(children),