Lines Matching refs:socket
5 use crate::socket::{AnySocket, Socket};
24 pub(crate) socket: Socket<'a>, field
60 pub fn add<T: AnySocket<'a>>(&mut self, socket: T) -> SocketHandle { in add()
61 fn put<'a>(index: usize, slot: &mut SocketStorage<'a>, socket: Socket<'a>) -> SocketHandle { in add()
67 inner: Some(Item { meta, socket }), in add()
72 let socket = socket.upcast(); in add() localVariable
76 return put(index, slot, socket); in add()
86 put(index, &mut sockets[index], socket) in add()
99 T::downcast(&item.socket).expect("handle refers to a socket of a wrong type") in get()
112 Some(item) => T::downcast_mut(&mut item.socket) in get_mut()
125 Some(item) => item.socket, in remove()
132 self.items().map(|i| (i.meta.handle, &i.socket)) in iter()
137 self.items_mut().map(|i| (i.meta.handle, &mut i.socket)) in iter_mut()