Struct fluvio_socket::FluvioStream
source · [−]pub struct FluvioStream { /* private fields */ }Expand description
inner flv stream which is generic over stream
Implementations
sourceimpl FluvioStream
impl FluvioStream
pub fn new(id: ConnectionFd, stream: BoxReadConnection) -> Self
pub fn get_mut_tcp_stream(
&mut self
) -> &mut FramedRead<Compat<BoxReadConnection>, FluvioCodec>
sourcepub fn request_stream<R>(
&mut self
) -> impl Stream<Item = Result<RequestMessage<R>, SocketError>> + '_ where
RequestMessage<R>: FluvioDecoder + Debug,
pub fn request_stream<R>(
&mut self
) -> impl Stream<Item = Result<RequestMessage<R>, SocketError>> + '_ where
RequestMessage<R>: FluvioDecoder + Debug,
as server, get stream of request coming from client
sourcepub async fn next_request_item<R>(
&mut self
) -> Option<Result<RequestMessage<R>, SocketError>> where
RequestMessage<R>: FluvioDecoder + Debug,
pub async fn next_request_item<R>(
&mut self
) -> Option<Result<RequestMessage<R>, SocketError>> where
RequestMessage<R>: FluvioDecoder + Debug,
as server, get next request from client
sourcepub async fn next_response<R>(
&mut self,
req_msg: &RequestMessage<R>
) -> Result<ResponseMessage<R::Response>, SocketError> where
R: Request,
pub async fn next_response<R>(
&mut self,
req_msg: &RequestMessage<R>
) -> Result<ResponseMessage<R::Response>, SocketError> where
R: Request,
as client, get next response from server
sourcepub fn api_stream<R, A>(
&mut self
) -> impl Stream<Item = Result<R, SocketError>> + '_ where
R: ApiMessage<ApiKey = A>,
A: FluvioDecoder + Debug,
pub fn api_stream<R, A>(
&mut self
) -> impl Stream<Item = Result<R, SocketError>> + '_ where
R: ApiMessage<ApiKey = A>,
A: FluvioDecoder + Debug,
as server, get api request (PublicRequest, InternalRequest, etc)
pub async fn next_api_item<R, A>(&mut self) -> Option<Result<R, SocketError>> where
R: ApiMessage<ApiKey = A>,
A: FluvioDecoder + Debug,
pub fn response_stream<R>(
&mut self,
req_msg: RequestMessage<R>
) -> impl Stream<Item = R::Response> + '_ where
R: Request,
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for FluvioStream
impl Send for FluvioStream
impl Sync for FluvioStream
impl Unpin for FluvioStream
impl !UnwindSafe for FluvioStream
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more