[][src]Struct kf_socket::InnerKfSocket

pub struct InnerKfSocket<S> { /* fields omitted */ }

KfSocket is high level socket that can send and receive kf-protocol

Implementations

impl<S> InnerKfSocket<S>[src]

pub fn new(sink: InnerKfSink<S>, stream: InnerKfStream<S>) -> Self[src]

pub fn split(self) -> (InnerKfSink<S>, InnerKfStream<S>)[src]

pub fn set_stale(&mut self)[src]

mark as stale

pub fn is_stale(&self) -> bool[src]

pub fn get_mut_sink(&mut self) -> &mut InnerKfSink<S>[src]

pub fn get_mut_stream(&mut self) -> &mut InnerKfStream<S>[src]

impl<S> InnerKfSocket<S> where
    S: AsyncRead + AsyncWrite + Unpin + Send
[src]

pub async fn connect_with_connector<'_, '_, C>(
    addr: &'_ str,
    connector: &'_ C
) -> Result<Self, KfSocketError> where
    C: TcpDomainConnector<WrapperStream = S>, 
[src]

connect to target address with connector

pub fn from_stream(tcp_stream: S, raw_fd: RawFd) -> Self[src]

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

as client, send request and wait for reply from server

impl InnerKfSocket<TcpStream>[src]

pub async fn connect<'_>(addr: &'_ str) -> Result<Self, KfSocketError>[src]

Trait Implementations

impl<S: Debug> Debug for InnerKfSocket<S>[src]

impl<S> From<(InnerKfSink<S>, InnerKfStream<S>)> for InnerKfSocket<S>[src]

impl<S> Sync for InnerKfSocket<S>[src]

Auto Trait Implementations

impl<S> !RefUnwindSafe for InnerKfSocket<S>

impl<S> Send for InnerKfSocket<S> where
    S: Send

impl<S> Unpin for InnerKfSocket<S>

impl<S> !UnwindSafe for InnerKfSocket<S>

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> Erased for T

impl<T> From<T> 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.