Struct fluvio_socket::FluvioSocket [−][src]
pub struct FluvioSocket { /* fields omitted */ }
Expand description
Socket abstract that can send and receive fluvio objects
Implementations
impl FluvioSocket
[src]
impl FluvioSocket
[src]pub fn new(sink: FluvioSink, stream: FluvioStream) -> Self
[src]
pub fn split(self) -> (FluvioSink, FluvioStream)
[src]
pub fn is_stale(&self) -> bool
[src]
pub fn get_mut_sink(&mut self) -> &mut FluvioSink
[src]
pub fn get_mut_stream(&mut self) -> &mut FluvioStream
[src]
pub fn id(&self) -> ConnectionFd
[src]
pub async fn send<R>(
&mut self,
req_msg: &RequestMessage<R>
) -> Result<ResponseMessage<R::Response>, FlvSocketError> where
R: Request,
[src]
pub async fn send<R>(
&mut self,
req_msg: &RequestMessage<R>
) -> Result<ResponseMessage<R::Response>, FlvSocketError> where
R: Request,
[src]as client, send request and wait for reply from server
impl FluvioSocket
[src]
impl FluvioSocket
[src]pub fn from_stream(
write: BoxWriteConnection,
read: BoxReadConnection,
fd: ConnectionFd
) -> Self
[src]
write: BoxWriteConnection,
read: BoxReadConnection,
fd: ConnectionFd
) -> Self
pub async fn connect_with_connector(
addr: &str,
connector: &dyn TcpDomainConnector
) -> Result<Self, FlvSocketError>
[src]
pub async fn connect_with_connector(
addr: &str,
connector: &dyn TcpDomainConnector
) -> Result<Self, FlvSocketError>
[src]connect to target address with connector
impl FluvioSocket
[src]
impl FluvioSocket
[src]pub async fn connect(addr: &str) -> Result<Self, FlvSocketError>
[src]
Trait Implementations
impl Debug for FluvioSocket
[src]
impl Debug for FluvioSocket
[src]impl From<(FluvioSink, FluvioStream)> for FluvioSocket
[src]
impl From<(FluvioSink, FluvioStream)> for FluvioSocket
[src]fn from(pair: (FluvioSink, FluvioStream)) -> Self
[src]
fn from(pair: (FluvioSink, FluvioStream)) -> Self
[src]Performs the conversion.
impl From<TcpStream> for FluvioSocket
[src]
impl From<TcpStream> for FluvioSocket
[src]Auto Trait Implementations
impl !RefUnwindSafe for FluvioSocket
impl Send for FluvioSocket
impl Sync for FluvioSocket
impl Unpin for FluvioSocket
impl !UnwindSafe for FluvioSocket
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
fn in_current_span(self) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]impl<T> AsyncConnector for T where
T: Send + Sync,
[src]
T: Send + Sync,