{"action":"created","issue":{"url":"https://api.github.com/repos/carllerche/mio/issues/204","labels_url":"https://api.github.com/repos/carllerche/mio/issues/204/labels{/name}","comments_url":"https://api.github.com/repos/carllerche/mio/issues/204/comments","events_url":"https://api.github.com/repos/carllerche/mio/issues/204/events","html_url":"https://github.com/carllerche/mio/issues/204","id":92978225,"number":204,"title":"Some additional traits inheriting from Evented for outside libraries to use.","user":{"login":"dpc","id":9209,"avatar_url":"https://avatars.githubusercontent.com/u/9209?v=3","gravatar_id":"","url":"https://api.github.com/users/dpc","html_url":"https://github.com/dpc","followers_url":"https://api.github.com/users/dpc/followers","following_url":"https://api.github.com/users/dpc/following{/other_user}","gists_url":"https://api.github.com/users/dpc/gists{/gist_id}","starred_url":"https://api.github.com/users/dpc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dpc/subscriptions","organizations_url":"https://api.github.com/users/dpc/orgs","repos_url":"https://api.github.com/users/dpc/repos","events_url":"https://api.github.com/users/dpc/events{/privacy}","received_events_url":"https://api.github.com/users/dpc/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/carllerche/mio/milestones/2","html_url":"https://github.com/carllerche/mio/milestones/v0.4%20Release","labels_url":"https://api.github.com/repos/carllerche/mio/milestones/2/labels","id":1148001,"number":2,"title":"v0.4 Release","description":"","creator":{"login":"carllerche","id":6180,"avatar_url":"https://avatars.githubusercontent.com/u/6180?v=3","gravatar_id":"","url":"https://api.github.com/users/carllerche","html_url":"https://github.com/carllerche","followers_url":"https://api.github.com/users/carllerche/followers","following_url":"https://api.github.com/users/carllerche/following{/other_user}","gists_url":"https://api.github.com/users/carllerche/gists{/gist_id}","starred_url":"https://api.github.com/users/carllerche/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carllerche/subscriptions","organizations_url":"https://api.github.com/users/carllerche/orgs","repos_url":"https://api.github.com/users/carllerche/repos","events_url":"https://api.github.com/users/carllerche/events{/privacy}","received_events_url":"https://api.github.com/users/carllerche/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":1,"state":"open","created_at":"2015-06-03T18:06:35Z","updated_at":"2015-07-09T21:51:51Z","due_on":"2015-07-01T07:00:00Z","closed_at":null},"comments":7,"created_at":"2015-07-04T06:37:02Z","updated_at":"2015-07-13T23:15:33Z","closed_at":null,"body":"Could `mio` define some additional traits inheriting from `Evented` trait?\r\n\r\nIn mioco I'm planing to use dynamic dispatch, so the coroutine needs to do everything through trait functions.\r\n\r\nIt seems to me that mio defined the following clases of `Evented` structs:\r\n\r\n* Readers\r\n * try_read\r\n * close (inbound)\r\n* Writers\r\n * try_write\r\n * close (outbound)\r\n* Listeners\r\n * accept\r\n * close (stop listening)\r\n* Connectors\r\n * connect\r\n* anything else? timers, signals etc?\r\n\r\nCould this traits be added to mio? Is this a good idea?\r\n"},"comment":{"url":"https://api.github.com/repos/carllerche/mio/issues/comments/121087818","html_url":"https://github.com/carllerche/mio/issues/204#issuecomment-121087818","issue_url":"https://api.github.com/repos/carllerche/mio/issues/204","id":121087818,"user":{"login":"dpc","id":9209,"avatar_url":"https://avatars.githubusercontent.com/u/9209?v=3","gravatar_id":"","url":"https://api.github.com/users/dpc","html_url":"https://github.com/dpc","followers_url":"https://api.github.com/users/dpc/followers","following_url":"https://api.github.com/users/dpc/following{/other_user}","gists_url":"https://api.github.com/users/dpc/gists{/gist_id}","starred_url":"https://api.github.com/users/dpc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dpc/subscriptions","organizations_url":"https://api.github.com/users/dpc/orgs","repos_url":"https://api.github.com/users/dpc/repos","events_url":"https://api.github.com/users/dpc/events{/privacy}","received_events_url":"https://api.github.com/users/dpc/received_events","type":"User","site_admin":false},"created_at":"2015-07-13T23:15:33Z","updated_at":"2015-07-13T23:15:33Z","body":"\"group `Evented`\" - define types of `Evented`-implementing structs, that behave the same way. \r\n\r\nmioco does already implement a trait that it uses for everything:\r\n\r\nhttps://github.com/dpc/mioco/blob/master/src/lib.rs#L87\r\n\r\nBut then I have to implement it for every `struct` from `mio`: https://github.com/dpc/mioco/blob/master/src/lib.rs#L111\r\n\r\nIf `mio` had a common traits that behave the same than I could do:\r\n\r\n```\r\nimpl<T> Evented for T where T : mio::Stream {\r\n\r\n}\r\n```\r\n\r\n```\r\nimpl<T> Evented for T where T : mio::Listener {\r\n\r\n}\r\n```\r\n\r\nand `mio` could add new types, without `mioco` having to add them too. Or event users could add types, if it's possible."}}