pub struct ExtcapControlReader { /* private fields */ }
Expand description
A reader for the Extcap control pipe.
Implementations§
Source§impl ExtcapControlReader
impl ExtcapControlReader
Sourcepub async fn new(in_path: &Path) -> Self
pub async 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 async fn read_control_packet(
&mut self,
) -> Result<ControlPacket<'static>, ReadControlError>
pub async fn read_control_packet( &mut self, ) -> Result<ControlPacket<'static>, ReadControlError>
Read one control packet, awaiting 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.
Auto Trait Implementations§
impl !Freeze for ExtcapControlReader
impl RefUnwindSafe for ExtcapControlReader
impl Send for ExtcapControlReader
impl Sync for ExtcapControlReader
impl Unpin for ExtcapControlReader
impl UnwindSafe for ExtcapControlReader
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