Struct fluvio_socket::FluvioSocket
source · [−]pub struct FluvioSocket { /* private fields */ }Expand description
Socket abstract that can send and receive fluvio objects
Implementations
sourceimpl FluvioSocket
impl FluvioSocket
pub fn new(sink: FluvioSink, stream: FluvioStream) -> Self
pub fn split(self) -> (FluvioSink, FluvioStream)
pub fn is_stale(&self) -> bool
pub fn get_mut_sink(&mut self) -> &mut FluvioSink
pub fn get_mut_stream(&mut self) -> &mut FluvioStream
pub fn id(&self) -> ConnectionFd
sourcepub async fn send<R>(
&mut self,
req_msg: &RequestMessage<R>
) -> Result<ResponseMessage<R::Response>, SocketError> where
R: Request,
pub async fn send<R>(
&mut self,
req_msg: &RequestMessage<R>
) -> Result<ResponseMessage<R::Response>, SocketError> where
R: Request,
as client, send request and wait for reply from server
sourceimpl FluvioSocket
impl FluvioSocket
pub fn from_stream(
write: BoxWriteConnection,
read: BoxReadConnection,
fd: ConnectionFd
) -> Self
sourcepub async fn connect_with_connector(
addr: &str,
connector: &dyn TcpDomainConnector
) -> Result<Self, SocketError>
pub async fn connect_with_connector(
addr: &str,
connector: &dyn TcpDomainConnector
) -> Result<Self, SocketError>
connect to target address with connector
sourceimpl FluvioSocket
impl FluvioSocket
pub async fn connect(addr: &str) -> Result<Self, SocketError>
Trait Implementations
sourceimpl Debug for FluvioSocket
impl Debug for FluvioSocket
sourceimpl From<(FluvioSink, FluvioStream)> for FluvioSocket
impl From<(FluvioSink, FluvioStream)> for FluvioSocket
sourcefn from(pair: (FluvioSink, FluvioStream)) -> Self
fn from(pair: (FluvioSink, FluvioStream)) -> Self
Converts to this type from the input type.
sourceimpl From<TcpStream> for FluvioSocket
impl From<TcpStream> for FluvioSocket
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
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