[][src]Struct udp_server::UdpContext

pub struct UdpContext<T: Send> {
    pub id: usize,
    pub send: Arc<Mutex<SendHalf>>,
    pub peers: Arc<Mutex<HashMap<SocketAddr, Arc<Peer<T>>>>>,
    // some fields omitted
}

UDP SOCKET 上下文,包含 id, 和Pees, 用于收发数据

Fields

id: usizesend: Arc<Mutex<SendHalf>>peers: Arc<Mutex<HashMap<SocketAddr, Arc<Peer<T>>>>>

Auto Trait Implementations

impl<T> !RefUnwindSafe for UdpContext<T>

impl<T> Send for UdpContext<T>

impl<T> Sync for UdpContext<T>

impl<T> Unpin for UdpContext<T>

impl<T> !UnwindSafe for UdpContext<T>

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> 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.