[−][src]Struct tcpserver::Builder
TCP server builder
Implementations
impl<I, R, T> Builder<I, R, T> where
I: Fn(TCPPeer) -> R + Send + Sync + 'static,
R: Future<Output = ()> + Send,
T: ToSocketAddrs,
[src]
I: Fn(TCPPeer) -> R + Send + Sync + 'static,
R: Future<Output = ()> + Send,
T: ToSocketAddrs,
pub fn new(addr: T) -> Builder<I, R, T>
[src]
pub fn set_input_event(self, f: I) -> Self
[src]
设置TCP server 输入事件
pub fn set_connect_event(self, c: ConnectEventType) -> Self
[src]
设置TCP server 连接事件
pub async fn build(__arg0: Self) -> TCPServer<I, R>
[src]
生成TCPSERVER,如果没有设置 tcp input 将报错
Auto Trait Implementations
impl<I, R, T> RefUnwindSafe for Builder<I, R, T> where
I: RefUnwindSafe,
T: RefUnwindSafe,
I: RefUnwindSafe,
T: RefUnwindSafe,
impl<I, R, T> Send for Builder<I, R, T> where
T: Send,
T: Send,
impl<I, R, T> Sync for Builder<I, R, T> where
T: Sync,
T: Sync,
impl<I, R, T> Unpin for Builder<I, R, T> where
I: Unpin,
T: Unpin,
I: Unpin,
T: Unpin,
impl<I, R, T> UnwindSafe for Builder<I, R, T> where
I: UnwindSafe,
T: UnwindSafe,
I: UnwindSafe,
T: UnwindSafe,
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> 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>,