{"action":"created","comment":{"url":"https://api.github.com/repos/flavray/avro-rs/pulls/comments/185196921","pull_request_review_id":116535505,"id":185196921,"diff_hunk":"@@ -32,10 +31,15 @@ pub struct Writer<'a, W> {\n }\n \n impl<'a, W: Write> Writer<'a, W> {\n+    /// Creates a `Writer` given a `Schema` and something implementing the `Write` trait to write","path":"src/writer.rs","position":35,"original_position":35,"commit_id":"d739a0eb609fb77cfbf8f5a2c554123443a4ead3","original_commit_id":"d739a0eb609fb77cfbf8f5a2c554123443a4ead3","user":{"login":"flavray","id":4570851,"avatar_url":"https://avatars0.githubusercontent.com/u/4570851?v=4","gravatar_id":"","url":"https://api.github.com/users/flavray","html_url":"https://github.com/flavray","followers_url":"https://api.github.com/users/flavray/followers","following_url":"https://api.github.com/users/flavray/following{/other_user}","gists_url":"https://api.github.com/users/flavray/gists{/gist_id}","starred_url":"https://api.github.com/users/flavray/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flavray/subscriptions","organizations_url":"https://api.github.com/users/flavray/orgs","repos_url":"https://api.github.com/users/flavray/repos","events_url":"https://api.github.com/users/flavray/events{/privacy}","received_events_url":"https://api.github.com/users/flavray/received_events","type":"User","site_admin":false},"body":"nit: do you think we should be more explicit and specify `io::Write`?\r\nIt seems almost obvious that we don't mean, say `fmt::Write`, but one never knows :)","created_at":"2018-05-01T10:09:24Z","updated_at":"2018-05-01T10:31:40Z","html_url":"https://github.com/flavray/avro-rs/pull/20#discussion_r185196921","pull_request_url":"https://api.github.com/repos/flavray/avro-rs/pulls/20","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/flavray/avro-rs/pulls/comments/185196921"},"html":{"href":"https://github.com/flavray/avro-rs/pull/20#discussion_r185196921"},"pull_request":{"href":"https://api.github.com/repos/flavray/avro-rs/pulls/20"}}},"pull_request":{"url":"https://api.github.com/repos/flavray/avro-rs/pulls/20","id":185096330,"html_url":"https://github.com/flavray/avro-rs/pull/20","diff_url":"https://github.com/flavray/avro-rs/pull/20.diff","patch_url":"https://github.com/flavray/avro-rs/pull/20.patch","issue_url":"https://api.github.com/repos/flavray/avro-rs/issues/20","number":20,"state":"open","locked":false,"title":"Writer module overhauling","user":{"login":"poros","id":1522950,"avatar_url":"https://avatars0.githubusercontent.com/u/1522950?v=4","gravatar_id":"","url":"https://api.github.com/users/poros","html_url":"https://github.com/poros","followers_url":"https://api.github.com/users/poros/followers","following_url":"https://api.github.com/users/poros/following{/other_user}","gists_url":"https://api.github.com/users/poros/gists{/gist_id}","starred_url":"https://api.github.com/users/poros/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/poros/subscriptions","organizations_url":"https://api.github.com/users/poros/orgs","repos_url":"https://api.github.com/users/poros/repos","events_url":"https://api.github.com/users/poros/events{/privacy}","received_events_url":"https://api.github.com/users/poros/received_events","type":"User","site_admin":false},"body":"This PR is proposing some changes to the writer module (and partially to the whole crate) as per the following commit messages.\r\n\r\n```\r\nMake encode and decode private\r\n\r\nThere is little reason why these should be public, especially if we\r\nexpose a write function with very little overhead.\r\n\r\nThey can always be made public when needed.\r\n```\r\n\r\n---\r\n\r\n```\r\nSubstitute SingleWriter with to_avro_datum\r\n\r\nThe avro implementations in other languages provide a DataFileWriter and\r\na DatumWriter which are respectively the interface to write to a file\r\nwith buffering and headers and the interface to just convert a value to\r\navro.\r\n\r\nWhile Writer is definitely equivalent (actually more generic than\r\nDataFileWriter since it accepts anything implementing Write), the\r\nSingleWriter struct wasn't really similar to DatumWriter. For this\r\nreason we replaced SingleWriter with the function to_avro_datum which\r\ndoes exactly what DatumWriter does.\r\n\r\nPlease notice that the Rust package doesn't provide a public\r\nEncoder/Decoder interface like other implementations at the moment,\r\nsince we only support binary encoding. Given that we don't even pass the\r\nwritable interface down to the encoder (because we can't see why we\r\nshould do it), this makes the Encoder/Decoder pretty much useless for\r\nthe users of the library.\r\n\r\nThis commit also changes the visibility rules of the writer module,\r\nre-exporting Writer and to_avro_datum at the lib level.\r\n```\r\n\r\n---\r\n\r\n```\r\nDocumentation for writer module\r\n```\r\n\r\n---\r\n\r\n```\r\nAdd unit tests to writer module\r\n\r\nThe number of bytes returned by the writing operations don't add up\r\nwith the length of the output data. The assertion has been commented as\r\nTODO.\r\n```\r\n\r\nClose #17  \r\nClose #9 \r\nReference #12 ","created_at":"2018-05-01T00:18:05Z","updated_at":"2018-05-01T10:31:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f389b864d6ee016199da48ab55f423b25594b5e9","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":{"url":"https://api.github.com/repos/flavray/avro-rs/milestones/1","html_url":"https://github.com/flavray/avro-rs/milestone/1","labels_url":"https://api.github.com/repos/flavray/avro-rs/milestones/1/labels","id":3273783,"number":1,"title":"First release","description":"`avro-rs` is feature complete, tested and documented so to be released on crates.io and added to the serde ecosystem","creator":{"login":"poros","id":1522950,"avatar_url":"https://avatars0.githubusercontent.com/u/1522950?v=4","gravatar_id":"","url":"https://api.github.com/users/poros","html_url":"https://github.com/poros","followers_url":"https://api.github.com/users/poros/followers","following_url":"https://api.github.com/users/poros/following{/other_user}","gists_url":"https://api.github.com/users/poros/gists{/gist_id}","starred_url":"https://api.github.com/users/poros/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/poros/subscriptions","organizations_url":"https://api.github.com/users/poros/orgs","repos_url":"https://api.github.com/users/poros/repos","events_url":"https://api.github.com/users/poros/events{/privacy}","received_events_url":"https://api.github.com/users/poros/received_events","type":"User","site_admin":false},"open_issues":10,"closed_issues":3,"state":"open","created_at":"2018-04-17T13:28:23Z","updated_at":"2018-05-01T00:18:53Z","due_on":"2018-05-14T07:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/flavray/avro-rs/pulls/20/commits","review_comments_url":"https://api.github.com/repos/flavray/avro-rs/pulls/20/comments","review_comment_url":"https://api.github.com/repos/flavray/avro-rs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/flavray/avro-rs/issues/20/comments","statuses_url":"https://api.github.com/repos/flavray/avro-rs/statuses/d739a0eb609fb77cfbf8f5a2c554123443a4ead3","head":{"label":"poros:antonio_writer_again","ref":"antonio_writer_again","sha":"d739a0eb609fb77cfbf8f5a2c554123443a4ead3","user":{"login":"poros","id":1522950,"avatar_url":"https://avatars0.githubusercontent.com/u/1522950?v=4","gravatar_id":"","url":"https://api.github.com/users/poros","html_url":"https://github.com/poros","followers_url":"https://api.github.com/users/poros/followers","following_url":"https://api.github.com/users/poros/following{/other_user}","gists_url":"https://api.github.com/users/poros/gists{/gist_id}","starred_url":"https://api.github.com/users/poros/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/poros/subscriptions","organizations_url":"https://api.github.com/users/poros/orgs","repos_url":"https://api.github.com/users/poros/repos","events_url":"https://api.github.com/users/poros/events{/privacy}","received_events_url":"https://api.github.com/users/poros/received_events","type":"User","site_admin":false},"repo":{"id":124902058,"name":"avro-rs","full_name":"poros/avro-rs","owner":{"login":"poros","id":1522950,"avatar_url":"https://avatars0.githubusercontent.com/u/1522950?v=4","gravatar_id":"","url":"https://api.github.com/users/poros","html_url":"https://github.com/poros","followers_url":"https://api.github.com/users/poros/followers","following_url":"https://api.github.com/users/poros/following{/other_user}","gists_url":"https://api.github.com/users/poros/gists{/gist_id}","starred_url":"https://api.github.com/users/poros/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/poros/subscriptions","organizations_url":"https://api.github.com/users/poros/orgs","repos_url":"https://api.github.com/users/poros/repos","events_url":"https://api.github.com/users/poros/events{/privacy}","received_events_url":"https://api.github.com/users/poros/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/poros/avro-rs","description":"Avro client library implementation in Rust","fork":true,"url":"https://api.github.com/repos/poros/avro-rs","forks_url":"https://api.github.com/repos/poros/avro-rs/forks","keys_url":"https://api.github.com/repos/poros/avro-rs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/poros/avro-rs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/poros/avro-rs/teams","hooks_url":"https://api.github.com/repos/poros/avro-rs/hooks","issue_events_url":"https://api.github.com/repos/poros/avro-rs/issues/events{/number}","events_url":"https://api.github.com/repos/poros/avro-rs/events","assignees_url":"https://api.github.com/repos/poros/avro-rs/assignees{/user}","branches_url":"https://api.github.com/repos/poros/avro-rs/branches{/branch}","tags_url":"https://api.github.com/repos/poros/avro-rs/tags","blobs_url":"https://api.github.com/repos/poros/avro-rs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/poros/avro-rs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/poros/avro-rs/git/refs{/sha}","trees_url":"https://api.github.com/repos/poros/avro-rs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/poros/avro-rs/statuses/{sha}","languages_url":"https://api.github.com/repos/poros/avro-rs/languages","stargazers_url":"https://api.github.com/repos/poros/avro-rs/stargazers","contributors_url":"https://api.github.com/repos/poros/avro-rs/contributors","subscribers_url":"https://api.github.com/repos/poros/avro-rs/subscribers","subscription_url":"https://api.github.com/repos/poros/avro-rs/subscription","commits_url":"https://api.github.com/repos/poros/avro-rs/commits{/sha}","git_commits_url":"https://api.github.com/repos/poros/avro-rs/git/commits{/sha}","comments_url":"https://api.github.com/repos/poros/avro-rs/comments{/number}","issue_comment_url":"https://api.github.com/repos/poros/avro-rs/issues/comments{/number}","contents_url":"https://api.github.com/repos/poros/avro-rs/contents/{+path}","compare_url":"https://api.github.com/repos/poros/avro-rs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/poros/avro-rs/merges","archive_url":"https://api.github.com/repos/poros/avro-rs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/poros/avro-rs/downloads","issues_url":"https://api.github.com/repos/poros/avro-rs/issues{/number}","pulls_url":"https://api.github.com/repos/poros/avro-rs/pulls{/number}","milestones_url":"https://api.github.com/repos/poros/avro-rs/milestones{/number}","notifications_url":"https://api.github.com/repos/poros/avro-rs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/poros/avro-rs/labels{/name}","releases_url":"https://api.github.com/repos/poros/avro-rs/releases{/id}","deployments_url":"https://api.github.com/repos/poros/avro-rs/deployments","created_at":"2018-03-12T14:30:35Z","updated_at":"2018-03-12T14:30:29Z","pushed_at":"2018-05-01T00:12:00Z","git_url":"git://github.com/poros/avro-rs.git","ssh_url":"git@github.com:poros/avro-rs.git","clone_url":"https://github.com/poros/avro-rs.git","svn_url":"https://github.com/poros/avro-rs","homepage":null,"size":119,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"flavray:dev","ref":"dev","sha":"39dd1ee447eae842f07a4e962ca3aa24cfecc985","user":{"login":"flavray","id":4570851,"avatar_url":"https://avatars0.githubusercontent.com/u/4570851?v=4","gravatar_id":"","url":"https://api.github.com/users/flavray","html_url":"https://github.com/flavray","followers_url":"https://api.github.com/users/flavray/followers","following_url":"https://api.github.com/users/flavray/following{/other_user}","gists_url":"https://api.github.com/users/flavray/gists{/gist_id}","starred_url":"https://api.github.com/users/flavray/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flavray/subscriptions","organizations_url":"https://api.github.com/users/flavray/orgs","repos_url":"https://api.github.com/users/flavray/repos","events_url":"https://api.github.com/users/flavray/events{/privacy}","received_events_url":"https://api.github.com/users/flavray/received_events","type":"User","site_admin":false},"repo":{"id":113157901,"name":"avro-rs","full_name":"flavray/avro-rs","owner":{"login":"flavray","id":4570851,"avatar_url":"https://avatars0.githubusercontent.com/u/4570851?v=4","gravatar_id":"","url":"https://api.github.com/users/flavray","html_url":"https://github.com/flavray","followers_url":"https://api.github.com/users/flavray/followers","following_url":"https://api.github.com/users/flavray/following{/other_user}","gists_url":"https://api.github.com/users/flavray/gists{/gist_id}","starred_url":"https://api.github.com/users/flavray/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flavray/subscriptions","organizations_url":"https://api.github.com/users/flavray/orgs","repos_url":"https://api.github.com/users/flavray/repos","events_url":"https://api.github.com/users/flavray/events{/privacy}","received_events_url":"https://api.github.com/users/flavray/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/flavray/avro-rs","description":"Avro client library implementation in Rust","fork":false,"url":"https://api.github.com/repos/flavray/avro-rs","forks_url":"https://api.github.com/repos/flavray/avro-rs/forks","keys_url":"https://api.github.com/repos/flavray/avro-rs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/flavray/avro-rs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/flavray/avro-rs/teams","hooks_url":"https://api.github.com/repos/flavray/avro-rs/hooks","issue_events_url":"https://api.github.com/repos/flavray/avro-rs/issues/events{/number}","events_url":"https://api.github.com/repos/flavray/avro-rs/events","assignees_url":"https://api.github.com/repos/flavray/avro-rs/assignees{/user}","branches_url":"https://api.github.com/repos/flavray/avro-rs/branches{/branch}","tags_url":"https://api.github.com/repos/flavray/avro-rs/tags","blobs_url":"https://api.github.com/repos/flavray/avro-rs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/flavray/avro-rs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/flavray/avro-rs/git/refs{/sha}","trees_url":"https://api.github.com/repos/flavray/avro-rs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/flavray/avro-rs/statuses/{sha}","languages_url":"https://api.github.com/repos/flavray/avro-rs/languages","stargazers_url":"https://api.github.com/repos/flavray/avro-rs/stargazers","contributors_url":"https://api.github.com/repos/flavray/avro-rs/contributors","subscribers_url":"https://api.github.com/repos/flavray/avro-rs/subscribers","subscription_url":"https://api.github.com/repos/flavray/avro-rs/subscription","commits_url":"https://api.github.com/repos/flavray/avro-rs/commits{/sha}","git_commits_url":"https://api.github.com/repos/flavray/avro-rs/git/commits{/sha}","comments_url":"https://api.github.com/repos/flavray/avro-rs/comments{/number}","issue_comment_url":"https://api.github.com/repos/flavray/avro-rs/issues/comments{/number}","contents_url":"https://api.github.com/repos/flavray/avro-rs/contents/{+path}","compare_url":"https://api.github.com/repos/flavray/avro-rs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/flavray/avro-rs/merges","archive_url":"https://api.github.com/repos/flavray/avro-rs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/flavray/avro-rs/downloads","issues_url":"https://api.github.com/repos/flavray/avro-rs/issues{/number}","pulls_url":"https://api.github.com/repos/flavray/avro-rs/pulls{/number}","milestones_url":"https://api.github.com/repos/flavray/avro-rs/milestones{/number}","notifications_url":"https://api.github.com/repos/flavray/avro-rs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/flavray/avro-rs/labels{/name}","releases_url":"https://api.github.com/repos/flavray/avro-rs/releases{/id}","deployments_url":"https://api.github.com/repos/flavray/avro-rs/deployments","created_at":"2017-12-05T08:59:24Z","updated_at":"2018-04-29T17:15:20Z","pushed_at":"2018-05-01T00:18:06Z","git_url":"git://github.com/flavray/avro-rs.git","ssh_url":"git@github.com:flavray/avro-rs.git","clone_url":"https://github.com/flavray/avro-rs.git","svn_url":"https://github.com/flavray/avro-rs","homepage":null,"size":114,"stargazers_count":4,"watchers_count":4,"language":null,"has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":11,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":1,"open_issues":11,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/flavray/avro-rs/pulls/20"},"html":{"href":"https://github.com/flavray/avro-rs/pull/20"},"issue":{"href":"https://api.github.com/repos/flavray/avro-rs/issues/20"},"comments":{"href":"https://api.github.com/repos/flavray/avro-rs/issues/20/comments"},"review_comments":{"href":"https://api.github.com/repos/flavray/avro-rs/pulls/20/comments"},"review_comment":{"href":"https://api.github.com/repos/flavray/avro-rs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/flavray/avro-rs/pulls/20/commits"},"statuses":{"href":"https://api.github.com/repos/flavray/avro-rs/statuses/d739a0eb609fb77cfbf8f5a2c554123443a4ead3"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"flavray"}}