pub struct StreamingProxy<H> { /* private fields */ }Expand description
Implementations§
Source§impl<H: ProxyHandler> StreamingProxy<H>
impl<H: ProxyHandler> StreamingProxy<H>
Sourcepub fn new(handler: H, config: ProxyConfig) -> Self
pub fn new(handler: H, config: ProxyConfig) -> Self
Create a new proxy with the given handler and configuration.
Sourcepub fn run<R: BufRead, W: Write>(
self,
reader: R,
writer: W,
cancel: CancellationToken,
) -> Result<W, StreamingProxyError>
pub fn run<R: BufRead, W: Write>( self, reader: R, writer: W, cancel: CancellationToken, ) -> Result<W, StreamingProxyError>
Run the proxy until input is exhausted, a quit command is received, or cancellation fires.
Returns the writer on success, or an error if the proxy failed.
Auto Trait Implementations§
impl<H> Freeze for StreamingProxy<H>where
H: Freeze,
impl<H> RefUnwindSafe for StreamingProxy<H>where
H: RefUnwindSafe,
impl<H> Send for StreamingProxy<H>where
H: Send,
impl<H> Sync for StreamingProxy<H>where
H: Sync,
impl<H> Unpin for StreamingProxy<H>where
H: Unpin,
impl<H> UnsafeUnpin for StreamingProxy<H>where
H: UnsafeUnpin,
impl<H> UnwindSafe for StreamingProxy<H>where
H: UnwindSafe,
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