Struct fluvio_socket::FluvioStream[][src]

pub struct FluvioStream(_);

inner flv stream which is generic over stream

Implementations

impl FluvioStream[src]

pub fn new(stream: BoxReadConnection) -> Self[src]

pub fn get_mut_tcp_stream(
    &mut self
) -> &mut FramedRead<Compat<BoxReadConnection>, FluvioCodec>
[src]

pub fn request_stream<R>(
    &mut self
) -> impl Stream<Item = Result<RequestMessage<R>, FlvSocketError>> + '_ where
    RequestMessage<R>: FluvioDecoder + Debug
[src]

as server, get stream of request coming from client

pub async fn next_request_item<R>(
    &mut self
) -> Option<Result<RequestMessage<R>, FlvSocketError>> where
    RequestMessage<R>: FluvioDecoder + Debug
[src]

as server, get next request from client

pub async fn next_response<R>(
    &mut self,
    req_msg: &RequestMessage<R>
) -> Result<ResponseMessage<R::Response>, FlvSocketError> where
    R: Request, 
[src]

as client, get next response from server

pub fn api_stream<R, A>(
    &mut self
) -> impl Stream<Item = Result<R, FlvSocketError>> + '_ where
    R: ApiMessage<ApiKey = A>,
    A: FluvioDecoder + Debug
[src]

as server, get api request (PublicRequest, InternalRequest, etc)

pub async fn next_api_item<R, A>(&mut self) -> Option<Result<R, FlvSocketError>> where
    R: ApiMessage<ApiKey = A>,
    A: FluvioDecoder + Debug
[src]

pub fn response_stream<R>(
    &mut self,
    req_msg: RequestMessage<R>
) -> impl Stream<Item = R::Response> + '_ where
    R: Request, 
[src]

Trait Implementations

impl From<FramedRead<Compat<Box<dyn ReadConnection + 'static, Global>>, FluvioCodec>> for FluvioStream[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.