{"action":"created","issue":{"url":"https://api.github.com/repos/zshipko/rust-kv/issues/3","repository_url":"https://api.github.com/repos/zshipko/rust-kv","labels_url":"https://api.github.com/repos/zshipko/rust-kv/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/zshipko/rust-kv/issues/3/comments","events_url":"https://api.github.com/repos/zshipko/rust-kv/issues/3/events","html_url":"https://github.com/zshipko/rust-kv/pull/3","id":314444017,"number":3,"title":"Simplify serde interactions","user":{"login":"asonix","id":5304643,"avatar_url":"https://avatars0.githubusercontent.com/u/5304643?v=4","gravatar_id":"","url":"https://api.github.com/users/asonix","html_url":"https://github.com/asonix","followers_url":"https://api.github.com/users/asonix/followers","following_url":"https://api.github.com/users/asonix/following{/other_user}","gists_url":"https://api.github.com/users/asonix/gists{/gist_id}","starred_url":"https://api.github.com/users/asonix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asonix/subscriptions","organizations_url":"https://api.github.com/users/asonix/orgs","repos_url":"https://api.github.com/users/asonix/repos","events_url":"https://api.github.com/users/asonix/events{/privacy}","received_events_url":"https://api.github.com/users/asonix/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-04-15T19:27:52Z","updated_at":"2018-04-15T19:28:40Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/zshipko/rust-kv/pulls/3","html_url":"https://github.com/zshipko/rust-kv/pull/3","diff_url":"https://github.com/zshipko/rust-kv/pull/3.diff","patch_url":"https://github.com/zshipko/rust-kv/pull/3.patch"},"body":"These changes not only allow for serialization and deserialization of user-defined types, but it also standardizes how users interact with this crate in terms of Serde.\r\n \r\nThe `SerdeEncoding` trait is used to add values to and fetch values from various wrapper types implementing `Encoding` for `Serialize + DeserializeOwned` types.\r\n\r\nExample usage:\r\n\r\n```rust\r\nlet t = SomeSerdeType::new();\r\n\r\nlet bucket = store.bucket::<&str, BincodeEncoding<T>>(Some(\"bucket-name\"))?;\r\nlet txn = bucket.write_txn()?;\r\n\r\ntxn.set(&bucket, \"some-key\", BincodeEncoding::from_serde(t))?;\r\ntxn.commit()?\r\n```\r\n\r\nMaybe I could implement something like\r\n```rust\r\nimpl<T, U> From<T> for U\r\nwhere\r\n    U: SerdeEncoding<T>,\r\n{\r\n    fn from(t: T) -> Self {\r\n        U::from_serde(t)\r\n    }\r\n}\r\n```\r\nto make usage easier"},"comment":{"url":"https://api.github.com/repos/zshipko/rust-kv/issues/comments/381431609","html_url":"https://github.com/zshipko/rust-kv/pull/3#issuecomment-381431609","issue_url":"https://api.github.com/repos/zshipko/rust-kv/issues/3","id":381431609,"user":{"login":"asonix","id":5304643,"avatar_url":"https://avatars0.githubusercontent.com/u/5304643?v=4","gravatar_id":"","url":"https://api.github.com/users/asonix","html_url":"https://github.com/asonix","followers_url":"https://api.github.com/users/asonix/followers","following_url":"https://api.github.com/users/asonix/following{/other_user}","gists_url":"https://api.github.com/users/asonix/gists{/gist_id}","starred_url":"https://api.github.com/users/asonix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asonix/subscriptions","organizations_url":"https://api.github.com/users/asonix/orgs","repos_url":"https://api.github.com/users/asonix/repos","events_url":"https://api.github.com/users/asonix/events{/privacy}","received_events_url":"https://api.github.com/users/asonix/received_events","type":"User","site_admin":false},"created_at":"2018-04-15T19:28:40Z","updated_at":"2018-04-15T19:28:40Z","author_association":"NONE","body":"Actually, let me go implement those `From<>`s real quick"}}
{"actor":{"display_login":"asonix"}}