{"action":"opened","number":20,"pull_request":{"url":"https://api.github.com/repos/ogham/rust-ansi-term/pulls/20","id":81989795,"html_url":"https://github.com/ogham/rust-ansi-term/pull/20","diff_url":"https://github.com/ogham/rust-ansi-term/pull/20.diff","patch_url":"https://github.com/ogham/rust-ansi-term/pull/20.patch","issue_url":"https://api.github.com/repos/ogham/rust-ansi-term/issues/20","number":20,"state":"open","locked":false,"title":"Expose Prefix and Suffix types","user":{"login":"dflemstr","id":56029,"avatar_url":"https://avatars.githubusercontent.com/u/56029?v=3","gravatar_id":"","url":"https://api.github.com/users/dflemstr","html_url":"https://github.com/dflemstr","followers_url":"https://api.github.com/users/dflemstr/followers","following_url":"https://api.github.com/users/dflemstr/following{/other_user}","gists_url":"https://api.github.com/users/dflemstr/gists{/gist_id}","starred_url":"https://api.github.com/users/dflemstr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dflemstr/subscriptions","organizations_url":"https://api.github.com/users/dflemstr/orgs","repos_url":"https://api.github.com/users/dflemstr/repos","events_url":"https://api.github.com/users/dflemstr/events{/privacy}","received_events_url":"https://api.github.com/users/dflemstr/received_events","type":"User","site_admin":false},"body":"This is useful if you are integrating with a library that only lets you write to a writer via callbacks.  Like:\r\n\r\n```rust\r\nimpl somelib::Callback for MyANSITermCallback {\r\n  fn before(&self, f: &mut fmt::Formatter) -> fmt::Result {\r\n    write!(f, \"{}\", self.style.prefix())\r\n  }\r\n\r\n  fn after(&self, f: &mut fmt::Formatter) -> fmt::Result {\r\n    write!(f, \"{}\", self.style.suffix())\r\n  }\r\n}\r\n```\r\n\r\nI will improve the rustdoc if people think the general API is sane.","created_at":"2016-08-19T14:26:47Z","updated_at":"2016-08-19T14:26:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/ogham/rust-ansi-term/pulls/20/commits","review_comments_url":"https://api.github.com/repos/ogham/rust-ansi-term/pulls/20/comments","review_comment_url":"https://api.github.com/repos/ogham/rust-ansi-term/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ogham/rust-ansi-term/issues/20/comments","statuses_url":"https://api.github.com/repos/ogham/rust-ansi-term/statuses/d89020d53744556f63d44b2de5feca2631e6eef1","head":{"label":"dflemstr:master","ref":"master","sha":"d89020d53744556f63d44b2de5feca2631e6eef1","user":{"login":"dflemstr","id":56029,"avatar_url":"https://avatars.githubusercontent.com/u/56029?v=3","gravatar_id":"","url":"https://api.github.com/users/dflemstr","html_url":"https://github.com/dflemstr","followers_url":"https://api.github.com/users/dflemstr/followers","following_url":"https://api.github.com/users/dflemstr/following{/other_user}","gists_url":"https://api.github.com/users/dflemstr/gists{/gist_id}","starred_url":"https://api.github.com/users/dflemstr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dflemstr/subscriptions","organizations_url":"https://api.github.com/users/dflemstr/orgs","repos_url":"https://api.github.com/users/dflemstr/repos","events_url":"https://api.github.com/users/dflemstr/events{/privacy}","received_events_url":"https://api.github.com/users/dflemstr/received_events","type":"User","site_admin":false},"repo":{"id":66080257,"name":"rust-ansi-term","full_name":"dflemstr/rust-ansi-term","owner":{"login":"dflemstr","id":56029,"avatar_url":"https://avatars.githubusercontent.com/u/56029?v=3","gravatar_id":"","url":"https://api.github.com/users/dflemstr","html_url":"https://github.com/dflemstr","followers_url":"https://api.github.com/users/dflemstr/followers","following_url":"https://api.github.com/users/dflemstr/following{/other_user}","gists_url":"https://api.github.com/users/dflemstr/gists{/gist_id}","starred_url":"https://api.github.com/users/dflemstr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dflemstr/subscriptions","organizations_url":"https://api.github.com/users/dflemstr/orgs","repos_url":"https://api.github.com/users/dflemstr/repos","events_url":"https://api.github.com/users/dflemstr/events{/privacy}","received_events_url":"https://api.github.com/users/dflemstr/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dflemstr/rust-ansi-term","description":"Rust library for ANSI terminal colours and styles (bold, underline)","fork":true,"url":"https://api.github.com/repos/dflemstr/rust-ansi-term","forks_url":"https://api.github.com/repos/dflemstr/rust-ansi-term/forks","keys_url":"https://api.github.com/repos/dflemstr/rust-ansi-term/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dflemstr/rust-ansi-term/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dflemstr/rust-ansi-term/teams","hooks_url":"https://api.github.com/repos/dflemstr/rust-ansi-term/hooks","issue_events_url":"https://api.github.com/repos/dflemstr/rust-ansi-term/issues/events{/number}","events_url":"https://api.github.com/repos/dflemstr/rust-ansi-term/events","assignees_url":"https://api.github.com/repos/dflemstr/rust-ansi-term/assignees{/user}","branches_url":"https://api.github.com/repos/dflemstr/rust-ansi-term/branches{/branch}","tags_url":"https://api.github.com/repos/dflemstr/rust-ansi-term/tags","blobs_url":"https://api.github.com/repos/dflemstr/rust-ansi-term/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dflemstr/rust-ansi-term/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dflemstr/rust-ansi-term/git/refs{/sha}","trees_url":"https://api.github.com/repos/dflemstr/rust-ansi-term/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dflemstr/rust-ansi-term/statuses/{sha}","languages_url":"https://api.github.com/repos/dflemstr/rust-ansi-term/languages","stargazers_url":"https://api.github.com/repos/dflemstr/rust-ansi-term/stargazers","contributors_url":"https://api.github.com/repos/dflemstr/rust-ansi-term/contributors","subscribers_url":"https://api.github.com/repos/dflemstr/rust-ansi-term/subscribers","subscription_url":"https://api.github.com/repos/dflemstr/rust-ansi-term/subscription","commits_url":"https://api.github.com/repos/dflemstr/rust-ansi-term/commits{/sha}","git_commits_url":"https://api.github.com/repos/dflemstr/rust-ansi-term/git/commits{/sha}","comments_url":"https://api.github.com/repos/dflemstr/rust-ansi-term/comments{/number}","issue_comment_url":"https://api.github.com/repos/dflemstr/rust-ansi-term/issues/comments{/number}","contents_url":"https://api.github.com/repos/dflemstr/rust-ansi-term/contents/{+path}","compare_url":"https://api.github.com/repos/dflemstr/rust-ansi-term/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dflemstr/rust-ansi-term/merges","archive_url":"https://api.github.com/repos/dflemstr/rust-ansi-term/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dflemstr/rust-ansi-term/downloads","issues_url":"https://api.github.com/repos/dflemstr/rust-ansi-term/issues{/number}","pulls_url":"https://api.github.com/repos/dflemstr/rust-ansi-term/pulls{/number}","milestones_url":"https://api.github.com/repos/dflemstr/rust-ansi-term/milestones{/number}","notifications_url":"https://api.github.com/repos/dflemstr/rust-ansi-term/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dflemstr/rust-ansi-term/labels{/name}","releases_url":"https://api.github.com/repos/dflemstr/rust-ansi-term/releases{/id}","deployments_url":"https://api.github.com/repos/dflemstr/rust-ansi-term/deployments","created_at":"2016-08-19T12:17:14Z","updated_at":"2016-08-19T12:17:15Z","pushed_at":"2016-08-19T14:04:05Z","git_url":"git://github.com/dflemstr/rust-ansi-term.git","ssh_url":"git@github.com:dflemstr/rust-ansi-term.git","clone_url":"https://github.com/dflemstr/rust-ansi-term.git","svn_url":"https://github.com/dflemstr/rust-ansi-term","homepage":"https://crates.io/crates/ansi_term","size":117,"stargazers_count":0,"watchers_count":0,"language":"Rust","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ogham:master","ref":"master","sha":"da69fa2f0e442d226857989c83a0d3acfae8fc3a","user":{"login":"ogham","id":503760,"avatar_url":"https://avatars.githubusercontent.com/u/503760?v=3","gravatar_id":"","url":"https://api.github.com/users/ogham","html_url":"https://github.com/ogham","followers_url":"https://api.github.com/users/ogham/followers","following_url":"https://api.github.com/users/ogham/following{/other_user}","gists_url":"https://api.github.com/users/ogham/gists{/gist_id}","starred_url":"https://api.github.com/users/ogham/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ogham/subscriptions","organizations_url":"https://api.github.com/users/ogham/orgs","repos_url":"https://api.github.com/users/ogham/repos","events_url":"https://api.github.com/users/ogham/events{/privacy}","received_events_url":"https://api.github.com/users/ogham/received_events","type":"User","site_admin":false},"repo":{"id":21386406,"name":"rust-ansi-term","full_name":"ogham/rust-ansi-term","owner":{"login":"ogham","id":503760,"avatar_url":"https://avatars.githubusercontent.com/u/503760?v=3","gravatar_id":"","url":"https://api.github.com/users/ogham","html_url":"https://github.com/ogham","followers_url":"https://api.github.com/users/ogham/followers","following_url":"https://api.github.com/users/ogham/following{/other_user}","gists_url":"https://api.github.com/users/ogham/gists{/gist_id}","starred_url":"https://api.github.com/users/ogham/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ogham/subscriptions","organizations_url":"https://api.github.com/users/ogham/orgs","repos_url":"https://api.github.com/users/ogham/repos","events_url":"https://api.github.com/users/ogham/events{/privacy}","received_events_url":"https://api.github.com/users/ogham/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ogham/rust-ansi-term","description":"Rust library for ANSI terminal colours and styles (bold, underline)","fork":false,"url":"https://api.github.com/repos/ogham/rust-ansi-term","forks_url":"https://api.github.com/repos/ogham/rust-ansi-term/forks","keys_url":"https://api.github.com/repos/ogham/rust-ansi-term/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ogham/rust-ansi-term/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ogham/rust-ansi-term/teams","hooks_url":"https://api.github.com/repos/ogham/rust-ansi-term/hooks","issue_events_url":"https://api.github.com/repos/ogham/rust-ansi-term/issues/events{/number}","events_url":"https://api.github.com/repos/ogham/rust-ansi-term/events","assignees_url":"https://api.github.com/repos/ogham/rust-ansi-term/assignees{/user}","branches_url":"https://api.github.com/repos/ogham/rust-ansi-term/branches{/branch}","tags_url":"https://api.github.com/repos/ogham/rust-ansi-term/tags","blobs_url":"https://api.github.com/repos/ogham/rust-ansi-term/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ogham/rust-ansi-term/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ogham/rust-ansi-term/git/refs{/sha}","trees_url":"https://api.github.com/repos/ogham/rust-ansi-term/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ogham/rust-ansi-term/statuses/{sha}","languages_url":"https://api.github.com/repos/ogham/rust-ansi-term/languages","stargazers_url":"https://api.github.com/repos/ogham/rust-ansi-term/stargazers","contributors_url":"https://api.github.com/repos/ogham/rust-ansi-term/contributors","subscribers_url":"https://api.github.com/repos/ogham/rust-ansi-term/subscribers","subscription_url":"https://api.github.com/repos/ogham/rust-ansi-term/subscription","commits_url":"https://api.github.com/repos/ogham/rust-ansi-term/commits{/sha}","git_commits_url":"https://api.github.com/repos/ogham/rust-ansi-term/git/commits{/sha}","comments_url":"https://api.github.com/repos/ogham/rust-ansi-term/comments{/number}","issue_comment_url":"https://api.github.com/repos/ogham/rust-ansi-term/issues/comments{/number}","contents_url":"https://api.github.com/repos/ogham/rust-ansi-term/contents/{+path}","compare_url":"https://api.github.com/repos/ogham/rust-ansi-term/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ogham/rust-ansi-term/merges","archive_url":"https://api.github.com/repos/ogham/rust-ansi-term/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ogham/rust-ansi-term/downloads","issues_url":"https://api.github.com/repos/ogham/rust-ansi-term/issues{/number}","pulls_url":"https://api.github.com/repos/ogham/rust-ansi-term/pulls{/number}","milestones_url":"https://api.github.com/repos/ogham/rust-ansi-term/milestones{/number}","notifications_url":"https://api.github.com/repos/ogham/rust-ansi-term/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ogham/rust-ansi-term/labels{/name}","releases_url":"https://api.github.com/repos/ogham/rust-ansi-term/releases{/id}","deployments_url":"https://api.github.com/repos/ogham/rust-ansi-term/deployments","created_at":"2014-07-01T12:13:31Z","updated_at":"2016-07-19T03:39:20Z","pushed_at":"2016-07-28T04:55:28Z","git_url":"git://github.com/ogham/rust-ansi-term.git","ssh_url":"git@github.com:ogham/rust-ansi-term.git","clone_url":"https://github.com/ogham/rust-ansi-term.git","svn_url":"https://github.com/ogham/rust-ansi-term","homepage":"https://crates.io/crates/ansi_term","size":106,"stargazers_count":57,"watchers_count":57,"language":"Rust","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":8,"mirror_url":null,"open_issues_count":3,"forks":8,"open_issues":3,"watchers":57,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ogham/rust-ansi-term/pulls/20"},"html":{"href":"https://github.com/ogham/rust-ansi-term/pull/20"},"issue":{"href":"https://api.github.com/repos/ogham/rust-ansi-term/issues/20"},"comments":{"href":"https://api.github.com/repos/ogham/rust-ansi-term/issues/20/comments"},"review_comments":{"href":"https://api.github.com/repos/ogham/rust-ansi-term/pulls/20/comments"},"review_comment":{"href":"https://api.github.com/repos/ogham/rust-ansi-term/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ogham/rust-ansi-term/pulls/20/commits"},"statuses":{"href":"https://api.github.com/repos/ogham/rust-ansi-term/statuses/d89020d53744556f63d44b2de5feca2631e6eef1"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":58,"deletions":16,"changed_files":1}}
{"actor":{"display_login":"dflemstr"}}