pub struct AptStream { /* private fields */ }Expand description
Asynchronous event stream for APT transport implementations.
Implementations§
Source§impl AptStream
impl AptStream
Sourcepub fn with_input_stream(
self,
input_stream: Box<dyn AsyncBufRead + Unpin + Send>,
) -> Result<Self, Error>
pub fn with_input_stream( self, input_stream: Box<dyn AsyncBufRead + Unpin + Send>, ) -> Result<Self, Error>
Sets the input stream for reading APT requests.
Must only be set before any requests are processed
(i.e. the first call to .next()), and should
ultimately be routed to the stdin of the transport process
that apt has spawned.
Sourcepub fn with_output_stream(
self,
output_stream: Box<dyn AsyncWrite + Unpin + Send>,
) -> Result<Self, Error>
pub fn with_output_stream( self, output_stream: Box<dyn AsyncWrite + Unpin + Send>, ) -> Result<Self, Error>
Sets the output stream for all response writes.
Must only be set before any requests are processed
(i.e. the first call to .next()), and should
ultimately be routed to the stdout of the transport process
that apt has spawned.
Auto Trait Implementations§
impl Freeze for AptStream
impl !RefUnwindSafe for AptStream
impl Send for AptStream
impl !Sync for AptStream
impl Unpin for AptStream
impl !UnwindSafe for AptStream
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