[−][src]Struct kf_socket::InnerKfSocket
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]
S: AsyncRead + AsyncWrite + Unpin + Send,
pub async fn connect_with_connector<'_, '_, C>(
addr: &'_ str,
connector: &'_ C
) -> Result<Self, KfSocketError> where
C: TcpDomainConnector<WrapperStream = S>,
[src]
addr: &'_ str,
connector: &'_ C
) -> Result<Self, KfSocketError> where
C: TcpDomainConnector<WrapperStream = S>,
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]
&'_ mut self,
req_msg: &'_ RequestMessage<R>
) -> Result<ResponseMessage<R::Response>, KfSocketError> where
R: Request,
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]
fn from(pair: (InnerKfSink<S>, InnerKfStream<S>)) -> Self
[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,
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[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]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,