mtop-client 0.16.2

Memcached client for mtop
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use crate::MtopError;
use std::path::Path;
use tokio::io::{ReadHalf, WriteHalf};
use tokio::net::UnixStream;

pub(crate) async fn unix_connect<P>(path: P) -> Result<(ReadHalf<UnixStream>, WriteHalf<UnixStream>), MtopError>
where
    P: AsRef<Path>,
{
    let unix_stream = UnixStream::connect(path).await.map_err(MtopError::from)?;
    Ok(tokio::io::split(unix_stream))
}