{"id":4850,"date":"2023-05-13T15:16:47","date_gmt":"2023-05-13T07:16:47","guid":{"rendered":"http:\/\/blog.coolcoding.cn\/?p=4850"},"modified":"2023-05-13T15:18:12","modified_gmt":"2023-05-13T07:18:12","slug":"rust%e7%9a%84%e5%ad%90%e7%9b%ae%e5%bd%95","status":"publish","type":"post","link":"https:\/\/blog.coolcoding.cn\/?p=4850","title":{"rendered":"rust\u7684\u76ee\u5f55\u7ec4\u7ec71"},"content":{"rendered":"\n<pre class=\"wp-block-code\"><code>main.rs\n  |__ [util] \u76ee\u5f55\n       |__ mod.rs\n       |__ mathlib.rs\n\n\/\/ mathlib.rs\npub fn add(a: i32, b: i32) -> i32 {\n    a + b\n}\n\n\/\/ mod.rs\npub mod mathlib;\n\n\/\/ main.rs\npub mod util;\nuse util::mathlib;\nfn main() {\n  let c = mathlib::add(1, 2);\n}\n\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=\/wp\/v2\/posts\/4850"}],"collection":[{"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4850"}],"version-history":[{"count":3,"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=\/wp\/v2\/posts\/4850\/revisions"}],"predecessor-version":[{"id":4853,"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=\/wp\/v2\/posts\/4850\/revisions\/4853"}],"wp:attachment":[{"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4850"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4850"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4850"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}