{"blog_url":"https://yohhoy.hatenadiary.jp/","width":"100%","author_url":"https://blog.hatena.ne.jp/yohhoy/","published":"2016-10-04 00:00:00","url":"https://yohhoy.hatenadiary.jp/entry/20161004/p1","type":"rich","author_name":"yohhoy","blog_title":"yohhoy\u306e\u65e5\u8a18","categories":["Rust"],"height":"190","version":"1.0","provider_url":"https://hatena.blog","image_url":null,"html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fyohhoy.hatenadiary.jp%2Fentry%2F20161004%2Fp1\" title=\"From/Into\u30c8\u30ec\u30a4\u30c8\u3068\u53cd\u5c04\u5f8b - yohhoy\u306e\u65e5\u8a18\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","provider_name":"Hatena Blog","description":"Rust\u6a19\u6e96\u30e9\u30a4\u30d6\u30e9\u30ea\u304c\u63d0\u4f9b\u3059\u308b std::convert::From \u30c8\u30ec\u30a4\u30c8\u306f\u3001\u4efb\u610f\u306e\u578b\u306b\u5bfe\u3057\u3066\u53cd\u5c04\u5f8b(reflexive law)\u3092\u6e80\u305f\u3059\u3002From\u30c8\u30ec\u30a4\u30c8\u306b\u3088\u308a\u5b9f\u88c5\u3055\u308c\u308b std::convert::Into \u30c8\u30ec\u30a4\u30c8\u3082\u307e\u305f\u53cd\u5c04\u5f8b\u3092\u6e80\u305f\u3059\u3002\uff3b\u672c\u8a18\u4e8b\u306fRust 1.12/Stable\u6e96\u62e0\uff3d struct T; let v1: T = From::from(T); // OK: T\u2192T\u3078\u5909\u63db let v2: T = Into::into(T); // OK: T\u2192T\u3078\u5909\u63db Rust\u6a19\u6e96\u30e9\u30a4\u30d6\u30e9\u30ea(libcore/convert.rs)\u5b9f\u88c5\u3088\u308a\u5f15\u7528\u3002 impl<T, U> Into<U> f\u2026","title":"From/Into\u30c8\u30ec\u30a4\u30c8\u3068\u53cd\u5c04\u5f8b"}