pub fn new(io: E, handle: &Handle) -> io::Result<PollEvented<E>>
        where E: Evented,
    {
        let token = match handle.inner() {
            Some(inner) => inner.add_source(&io)?,
            None => {
                return Err(io::Error::new(io::ErrorKind::Other, "event loop gone"))
            }
        };

        Ok(PollEvented {
            token,
            readiness: 0,
            handle: handle.clone(),
            io: io,
        })
    }
/// Creates a new readiness stream associated with the provided
/// `loop_handle` and for the given `source`.
Creates a new readiness stream associated with the provided
`loop_handle` and for the given `source`.
Creates a new readiness stream associated with the provided ` loop_handle ` and for the given ` source ` .
pub fn new(io: E, handle: &Handle) -> io::Result<PollEvented<E>>
        where E: Evented,
    {
        let token = match handle.inner() {
            Some(inner) => inner.add_source(&io)?,
            None => {
                return Err(io::Error::new(io::ErrorKind::Other, "event loop gone"))
            }
        };
        Ok(PollEvented {
            token,
            readiness: 0,
            handle: handle.clone(),
            io: io,
        })
    }
pub fn new ( io : E , handle : & Handle ) -> io :: Result < PollEvented < E > > where E : Evented , { let token = match handle . inner ( ) { Some ( inner ) => inner . add_source ( & io ) ? , None => { return Err ( io :: Error :: new ( io :: ErrorKind :: Other , " " ) ) } } ; Ok ( PollEvented { token , readiness : 0 , handle : handle . clone ( ) , io : io , } ) }
Creates a new readiness stream associated with the provided
`loop_handle` and for the given `source`.
Creates a new readiness stream associated with the provided ` loop_handle ` and for the given ` source ` .
io
E
handle
&Handle
io
E
handle
&Handle