Struct r_extcap::controls::synchronous::ExtcapControlReader
source · pub struct ExtcapControlReader { /* private fields */ }
Expand description
A reader for the Extcap control pipe.
Implementations§
source§impl ExtcapControlReader
impl ExtcapControlReader
sourcepub fn new(in_path: &Path) -> Self
pub fn new(in_path: &Path) -> Self
Creates a new instance of ExtcapControlReader
.
in_path
: The path of the extcap control pipe passed with--extcap-control-in
.
sourcepub fn read_control_packet(
&self
) -> Result<ControlPacket<'static>, ReadControlError>
pub fn read_control_packet( &self ) -> Result<ControlPacket<'static>, ReadControlError>
Read one control packet, blocking until the packet arrives. Since the
control packet pipe is expected to stay open for the entire duration of
the extcap program, if the pipe is closed prematurely in this function
here, UnexpectedEof
will be returned.