{"id":266240,"date":"2015-09-23T14:51:03","date_gmt":"2015-09-23T10:51:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=266240"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=266240","title":{"rendered":"\u0421\u043e\u0437\u0434\u0430\u0451\u043c REST-\u0441\u0435\u0440\u0432\u0438\u0441 \u043d\u0430 PostgreSQL \u0438 Rust. \u0427\u0430\u0441\u0442\u044c 1: \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f"},"content":{"rendered":"<p>       \u0412\u0441\u0435\u043c \u043f\u0440\u0438\u0432\u0435\u0442.<\/p>\n<p>  \u041a\u0430\u043a\u043e\u0435-\u0442\u043e \u0432\u0440\u0435\u043c\u044f \u043d\u0430\u0437\u0430\u0434 \u044f \u0432\u0438\u0434\u0435\u043b \u0432 \u043d\u0435\u0431\u0435\u0437\u044b\u0437\u0432\u0435\u0441\u0442\u043d\u043e\u043c \u0431\u043b\u043e\u0433\u0435 <a href=\"http:\/\/eax.me\/go-databases\/\">\u043f\u043e\u0441\u0442 \u043e \u0442\u043e\u043c<\/a>, \u043a\u0430\u043a \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0430 Go \u043f\u0440\u043e\u0441\u0442\u0443\u044e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443, \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0443\u044e \u0441 \u0411\u0414, \u0430 \u0437\u0430\u0442\u0435\u043c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0430 \u0435\u0451 \u0431\u0430\u0437\u0435 \u0446\u0435\u043b\u044b\u0439 <a href=\"http:\/\/eax.me\/go-rest-service\/\">REST-\u0441\u0435\u0440\u0432\u0438\u0441<\/a>. \u042f \u0440\u0435\u0448\u0438\u043b \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u043b\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u0443\u044e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u043d\u0430 Rust \u0438 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u043c\u0438.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/8f1\/360\/29d\/8f136029d86046d1bdb236a5f9da9af9.png\" height=\"66%\" width=\"66%\"\/><\/p>\n<p>  \u041c\u044b \u043d\u0430\u0447\u043d\u0451\u043c \u0441 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0411\u0414 \u0438 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043e\u0431\u044b\u0447\u043d\u043e\u0435 \u043a\u043e\u043d\u0441\u043e\u043b\u044c\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0430 \u0437\u0430\u0442\u0435\u043c \u0434\u043e\u0431\u0430\u0432\u0438\u043c, \u0442\u0430\u043a \u0441\u043a\u0430\u0437\u0430\u0442\u044c, REST-\u0444\u0440\u043e\u043d\u0442\u0435\u043d\u0434.<br \/>  <a name=\"habracut\"><\/a><br \/>  \u041d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0441\u0442\u0443\u043f\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0437\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u0439.<\/p>\n<p>  \u0414\u043b\u044f \u043d\u0435\u0442\u0435\u0440\u043f\u0435\u043b\u0438\u0432\u044b\u0445 \u2014 \u0432\u043e\u0442 <a href=\"https:\/\/github.com\/mkpankov\/rust-phonebook\">\u0437\u0430\u043a\u043e\u043d\u0447\u0435\u043d\u043d\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442<\/a> \u043d\u0430 GitHub. \u041e\u043d \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0432 \u0441\u0435\u0431\u044f \u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e REST-\u0441\u0435\u0440\u0432\u0438\u0441\u0430. \u0412\u0441\u0435\u0445 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u0436\u0435 \u043f\u0440\u0438\u0433\u043b\u0430\u0448\u0430\u044e \u0447\u0438\u0442\u0430\u0442\u044c \u0434\u0430\u043b\u044c\u0448\u0435.<\/p>\n<p>  \u0412 \u0446\u0435\u043b\u043e\u043c, \u044f \u043f\u043e\u0441\u0442\u0430\u0440\u0430\u044e\u0441\u044c \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043f\u0440\u043e\u0438\u043b\u043b\u044e\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0441\u043e \u0432\u0441\u0435\u043c\u0438 \u043e\u0448\u0438\u0431\u043a\u0430\u043c\u0438, \u043a\u0430\u0441\u0430\u044e\u0449\u0438\u043c\u0438\u0441\u044f Rust, \u0438\u0445 \u043f\u0440\u0438\u0447\u0438\u043d\u0430\u043c\u0438 \u0438 \u0441\u043f\u043e\u0441\u043e\u0431\u0430\u043c\u0438 \u0443\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u0438\u044f. \u042f \u0434\u0443\u043c\u0430\u044e, \u0437\u043d\u0430\u043d\u0438\u0435 \u0442\u0438\u043f\u0438\u0447\u043d\u044b\u0445 \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u0438 \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432 \u0438\u0445 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0441\u0438\u043b\u044c\u043d\u043e \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u043d\u043e\u0432\u0438\u0447\u043a\u0430\u043c \u0432 \u044f\u0437\u044b\u043a\u0435. \u041d\u0435 \u0431\u043e\u0439\u0442\u0435\u0441\u044c \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430, \u043e\u043d \u2014 \u0432\u0430\u0448 \u0434\u0440\u0443\u0433.<\/p>\n<p>  \u0412\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 Rust (<a href=\"http:\/\/kgv.github.io\/rust_book_ru\/src\/installing-rust.html\">\u043a\u0430\u043a \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c<\/a>). \u0414\u043e\u043b\u0436\u043d\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043b\u044e\u0431\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u043f\u043e\u0441\u043b\u0435 1.0 \u2014 \u043a\u0430\u043a stable, \u0442\u0430\u043a \u0438 nightly. \u042f \u043f\u0440\u043e\u0431\u043e\u0432\u0430\u043b \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u0435 1.1-1.3.<\/p>\n<p>  \u0421\u0430\u043c \u043a\u043e\u0434 \u0437\u0434\u0435\u0441\u044c \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f\u043d\u043e\u0433\u043e \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430 \u2014 \u044f \u0441\u0435\u0439\u0447\u0430\u0441 \u043d\u0435 \u043f\u044b\u0442\u0430\u044e\u0441\u044c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043e\u0447\u0435\u043d\u044c \u043d\u0430\u0434\u0451\u0436\u043d\u0443\u044e \u0438\u043b\u0438 \u0447\u0438\u0442\u0430\u0431\u0435\u043b\u044c\u043d\u0443\u044e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443. \u0420\u0430\u0437\u043e\u0431\u0440\u0430\u0432\u0448\u0438\u0441\u044c \u0432 \u043d\u0451\u043c, \u043c\u043e\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u0434\u0443\u043c\u0430\u0442\u044c\u0441\u044f \u043e \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0438 \u0441\u0442\u0438\u043b\u0435 \u043f\u043e\u0437\u0436\u0435. \u041e\u0434\u043d\u0430\u043a\u043e, \u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0430 \u044d\u0442\u0430 \u0432\u0435\u0440\u0441\u0438\u044f \u0431\u044b\u043b\u0430 \u0432\u0435\u0441\u044c\u043c\u0430 \u0431\u044b\u0441\u0442\u0440\u043e.<\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043a \u0434\u0435\u043b\u0443.<\/p>\n<p>  \u041a\u0430\u043a \u0438 \u043b\u044e\u0431\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u043d\u0430 Rust, \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u044e\u0449\u0438\u0439 \u043e\u0441\u043e\u0431\u044b\u0445 \u0445\u0438\u0442\u0440\u043e\u0441\u0442\u0435\u0439 \u0441\u043e \u0441\u0431\u043e\u0440\u043a\u043e\u0439, \u043d\u0430\u0448\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Cargo. \u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043d\u043e\u0432\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442:<\/p>\n<pre> $ cargo new --bin rust-phonebook $ cd rust-phonebook <\/pre>\n<p>  Cargo \u0437\u0430\u0431\u043e\u0442\u043b\u0438\u0432\u043e \u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 Git.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041a\u0430\u043a \u044d\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre> $ git status  On branch master  Initial commit  Untracked files:   (use &quot;git add &lt;file&gt;...&quot; to include in what will be committed)  \t.gitignore \tCargo.toml \tsrc\/  nothing added to commit but untracked files present (use &quot;git add&quot; to track) <\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0418 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0441\u0440\u0430\u0437\u0443 \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043d\u0430\u0448\u0443 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443-\u0437\u0430\u0433\u043b\u0443\u0448\u043a\u0443:<\/p>\n<pre> $ cargo run     Compiling rust-phonebook v0.1.0 (file:\/\/\/home\/mkpankov\/rust-phonebook)      Running `target\/debug\/rust-phonebook` Hello, world! <\/pre>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u0437\u0430\u043a\u043e\u043c\u043c\u0438\u0442\u0438\u043c \u043d\u0430\u0448\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0438 \u043f\u0435\u0440\u0435\u0439\u0434\u0451\u043c \u043a \u0441\u0443\u0442\u0438 \u043d\u0430\u0448\u0435\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b.<\/p>\n<hr\/>\n<p>  \u041d\u0430\u0447\u043d\u0451\u043c \u0441 \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0435\u0433\u043e \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u043a \u0431\u0430\u0437\u0435, \u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u043e\u0434\u043d\u0443 \u0442\u0430\u0431\u043b\u0438\u0446\u0443, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u0442\u0443\u0434\u0430 \u043e\u0434\u043d\u0443 \u0437\u0430\u043f\u0438\u0441\u044c \u0438 \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442 \u0435\u0451 \u043e\u0431\u0440\u0430\u0442\u043d\u043e.<\/p>\n<p>  \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u044f \u043f\u0440\u0438\u0432\u0435\u0434\u0443 \u0432\u0435\u0441\u044c \u043a\u043e\u0434 \u0446\u0435\u043b\u0438\u043a\u043e\u043c, \u0430 \u0437\u0430\u0442\u0435\u043c \u043e\u0431\u044a\u044f\u0441\u043d\u044e \u043a\u0430\u0436\u0434\u0443\u044e \u0435\u0433\u043e \u0447\u0430\u0441\u0442\u044c. \u041d\u0438\u0436\u0435 \u2014 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 src\/main.rs.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041a\u043e\u0434<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"rust\">extern crate postgres;  use postgres::{Connection, SslMode};  struct Person {     id: i32,     name: String,     data: Option&lt;Vec&lt;u8&gt;&gt; }  fn main() {     let conn =         Connection::connect(             &quot;postgres:\/\/postgres:postgres@localhost&quot;,             &SslMode::None)         .unwrap();      conn.execute(         &quot;CREATE TABLE person (            id              SERIAL PRIMARY KEY,            name            VARCHAR NOT NULL,            data            BYTEA          )&quot;,         &[])         .unwrap();      let me = Person {         id: 0,         name: &quot;\u041c\u0438\u0445\u0430\u0438\u043b&quot;.to_string(),         data: None     };      conn.execute(         &quot;INSERT INTO person (name, data) VALUES ($1, $2)&quot;,         &[&me.name, &me.data])         .unwrap();      let stmt = conn.prepare(&quot;SELECT id, name, data FROM person&quot;).unwrap();      for row in stmt.query(&[]).unwrap() {         let person = Person {             id: row.get(0),             name: row.get(1),             data: row.get(2)         };         println!(&quot;\u041d\u0430\u0448\u043b\u0438 \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430: {}&quot;, person.name);     } } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0437\u0431\u0435\u0440\u0451\u043c \u0432\u0441\u0435 \u043f\u043e \u043f\u043e\u0440\u044f\u0434\u043a\u0443.<\/p>\n<pre><code class=\"rust\">fn main() {     let conn =         Connection::connect(             &quot;postgres:\/\/postgres:postgres@localhost&quot;,             &SslMode::None)         .unwrap(); <\/code><\/pre>\n<p>  \u041f\u0435\u0440\u0432\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430 \u0432 \u043d\u0430\u0448\u0435\u043c \u043d\u043e\u0432\u043e\u043c main \u2014 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a \u0411\u0414. \u0422\u0443\u0442 \u0441\u0442\u043e\u0438\u0442 \u0441\u0440\u0430\u0437\u0443 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435.<\/p>\n<p>  \u041c\u044b \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u043c, \u0447\u0442\u043e \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e \u0437\u0430\u043f\u0443\u0449\u0435\u043d \u0441\u0435\u0440\u0432\u0435\u0440 PostgreSQL \u043d\u0430 \u043f\u043e\u0440\u0442\u0443 \u043f\u043e-\u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e, \u0430 \u0438\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438 \u043f\u0430\u0440\u043e\u043b\u044c \u2014 \u00abpostgres\u00bb. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0430\u043c, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u043d\u0443\u0436\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c PostgreSQL. \u041c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <a href=\"http:\/\/www.if-not-true-then-false.com\/2012\/install-postgresql-on-fedora-centos-red-hat-rhel\/comment-page-2\/\">\u044d\u0442\u043e \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e<\/a>. \u0423\u043a\u0430\u0436\u0438\u0442\u0435 \u0432\u0430\u0448\u0435 \u0438\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u0438\u043c\u0435\u044e\u0449\u0435\u0433\u043e \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0431\u0430\u0437\u0435, \u0438 \u0435\u0433\u043e \u043f\u0430\u0440\u043e\u043b\u044c \u0432\u043c\u0435\u0441\u0442\u043e \u00abpostgres:postgres\u00bb.<\/p>\n<p>  \u041f\u043e\u043c\u0438\u043c\u043e \u044d\u0442\u043e\u0433\u043e, \u043d\u0435 \u0437\u0430\u0431\u0443\u0434\u044c\u0442\u0435 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<p>  \u0421\u0430\u043c \u0432\u044b\u0448\u0435\u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u044b\u0439 Connection \u2014 \u0442\u0438\u043f \u0438\u0437 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 postgres (<a href=\"http:\/\/sfackler.github.io\/rust-postgres\/doc\/v0.10.0\/postgres\/\">\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f<\/a>). \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u043c \u0435\u0433\u043e \u0441\u0432\u044f\u0437\u044b\u0432\u0430\u043d\u0438\u0435 \u0432\u0432\u0435\u0440\u0445\u0443 \u0444\u0430\u0439\u043b\u0430<\/p>\n<pre><code class=\"rust\">extern crate postgres; <\/code><\/pre>\n<p>  \u0438 \u0432\u0432\u043e\u0434\u0438\u043c \u0432 \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438 Connection \u0438 SslMode<\/p>\n<pre><code class=\"rust\">use postgres::{Connection, SslMode}; <\/code><\/pre>\n<p>  \u0415\u0441\u043b\u0438 \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u043f\u0440\u044f\u043c\u043e \u0441\u0435\u0439\u0447\u0430\u0441, \u0432\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0435 \u0434\u0440\u0443\u0433\u0443\u044e \u043e\u0448\u0438\u0431\u043a\u0443:<\/p>\n<pre> $ cargo build    Compiling rust-phonebook v0.1.0 (file:\/\/\/home\/mkpankov\/rust-phonebook.finished) src\/main.rs:1:1: 1:23 error: can't find crate for `postgres` src\/main.rs:1 extern crate postgres;               ^~~~~~~~~~~~~~~~~~~~~~ error: aborting due to previous error Could not compile `rust-phonebook`.  To learn more, run the command again with --verbose. <\/pre>\n<p>  \u042d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u043d\u0435 \u043d\u0430\u0448\u0451\u043b \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u0439 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440. \u042d\u0442\u043e \u043f\u043e\u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u043c\u044b \u043d\u0435 \u0443\u043a\u0430\u0437\u0430\u043b\u0438 \u0435\u0433\u043e \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044f\u0445 \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u044d\u0442\u043e \u0432 Cargo.toml (<a href=\"http:\/\/doc.crates.io\/guide.html#adding-dependencies\">\u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435<\/a>):<\/p>\n<pre> [dependencies]  postgres = &quot;0.9&quot; <\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0432\u0441\u0451 \u0434\u043e\u043b\u0436\u043d\u043e \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f. \u041d\u043e \u0435\u0441\u043b\u0438 \u0432\u044b \u043d\u0435 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043b\u0438 \u0441\u0435\u0440\u0432\u0435\u0440, \u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0435 \u0442\u0430\u043a\u0443\u044e \u043e\u0448\u0438\u0431\u043a\u0443:<\/p>\n<pre>  $ cargo run      Running `target\/debug\/rust-phonebook` thread '&lt;main&gt;' panicked at 'called `Result::unwrap()` on an `Err` value: IoError(Error { repr: Os { code: 111, message: &quot;Connection refused&quot; } })', ..\/src\/libcore\/result.rs:732 <\/pre>\n<p>  \u042d\u0442\u043e \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043d\u0430\u0448\u0435\u0433\u043e .unwrap() \u2014 \u043e\u043d \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u043f\u0430\u043d\u0438\u043a\u0443 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u043f\u043e\u0442\u043e\u043a\u0430, \u0435\u0441\u043b\u0438 Result \u0431\u044b\u043b \u043d\u0435 Ok(_) \u2014 \u0442.\u0435. \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u0430 \u043e\u0448\u0438\u0431\u043a\u0430 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f.<\/p>\n<p>  \u041a\u0441\u0442\u0430\u0442\u0438, backtrace \u0434\u043b\u044f \u043d\u0435\u0451 \u043c\u043e\u0436\u043d\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c, \u0435\u0441\u043b\u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u0441 \u0432\u044b\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u043c RUST_BACKTRACE=1 \u0432 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0438 (\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u043e\u0442\u043b\u0430\u0434\u043e\u0447\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b!).<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">Backtrace<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre> $ RUST_BACKTRACE=1 cargo run       Running `target\/debug\/rust-phonebook` thread '&lt;main&gt;' panicked at 'called `Result::unwrap()` on an `Err` value: IoError(Error { repr: Os { code: 111, message: &quot;Connection refused&quot; } })', ..\/src\/libcore\/result.rs:732 stack backtrace:    1:     0x56007b30a95e - sys::backtrace::write::haf6e4e635ac76143Ivs    2:     0x56007b30df06 - panicking::on_panic::ha085a58a08f78856lzx    3:     0x56007b3049ae - rt::unwind::begin_unwind_inner::hc90ee27246f12475C0w    4:     0x56007b304ee6 - rt::unwind::begin_unwind_fmt::ha4be06289e0df3dbIZw    5:     0x56007b30d8d6 - rust_begin_unwind    6:     0x56007b3390c4 - panicking::panic_fmt::he7875691f9cbe589SgC    7:     0x56007b25e58d - result::Result&lt;T, E&gt;::unwrap::h10659124002062427088                         at ..\/src\/libcore\/macros.rs:28    8:     0x56007b25dcfd - main::h2f2e9aa4b99bad67saa                         at src\/main.rs:13    9:     0x56007b30d82d - __rust_try   10:     0x56007b30fbca - rt::lang_start::hefba4015e797c325hux   11:     0x56007b27d1ab - main   12:     0x7fb3f21076ff - __libc_start_main   13:     0x56007b25db48 - _start   14:                0x0 - &lt;unknown&gt; <\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0424\u0443\u0445, \u0432\u0441\u0435\u0433\u043e \u043e\u0434\u043d\u0430 \u0441\u0442\u0440\u043e\u0447\u043a\u0430, \u0430 \u0441\u0442\u043e\u043b\u044c\u043a\u043e \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432 \u043d\u0430\u043a\u043e\u0441\u044f\u0447\u0438\u0442\u044c! \u041d\u0430\u0434\u0435\u044e\u0441\u044c, \u0432\u044b \u043d\u0435 \u0441\u0438\u043b\u044c\u043d\u043e \u043d\u0430\u043f\u0443\u0433\u0430\u043d\u044b \u0438 \u0433\u043e\u0442\u043e\u0432\u044b \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0442\u044c.<\/p>\n<p>  \u041f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u043c\u043e\u043c\u0435\u043d\u0442\u043e\u043c \u0437\u0434\u0435\u0441\u044c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0442\u043e, \u0447\u0442\u043e \u043c\u044b \u044f\u0432\u043d\u043e \u0433\u043e\u0432\u043e\u0440\u0438\u043c, \u0447\u0442\u043e \u0445\u043e\u0442\u0438\u043c \u0443\u0440\u043e\u043d\u0438\u0442\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u043f\u0440\u0438 \u043e\u0448\u0438\u0431\u043a\u0435 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f. \u041a\u043e\u0433\u0434\u0430 \u043c\u044b \u0437\u0430\u0445\u043e\u0442\u0438\u043c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0438\u0437 \u043d\u0430\u0448\u0435\u0439 \u0438\u0433\u0440\u0443\u0448\u043a\u0438 \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u043e\u0434\u0443\u043a\u0442, \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0439 \u043f\u043e\u0438\u0441\u043a \u043f\u043e .unwrap() \u043f\u043e\u043a\u0430\u0436\u0435\u0442, \u0441 \u0447\u0435\u0433\u043e \u0441\u0442\u043e\u0438\u0442 \u043d\u0430\u0447\u0430\u0442\u044c. \u0414\u0430\u043b\u044c\u0448\u0435 \u044f \u043d\u0435 \u0431\u0443\u0434\u0443 \u043e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u044d\u0442\u043e\u043c \u043c\u043e\u043c\u0435\u043d\u0442\u0435.<\/p>\n<p>  \u0421\u043e\u0437\u0434\u0430\u0451\u043c \u0442\u0430\u0431\u043b\u0438\u0446\u0443:<\/p>\n<pre><code class=\"rust\">    conn.execute(         &quot;CREATE TABLE person (            id              SERIAL PRIMARY KEY,            name            VARCHAR NOT NULL,            data            BYTEA          )&quot;,         &[])         .unwrap(); <\/code><\/pre>\n<p>  \u0421\u0442\u0440\u0430\u043d\u043d\u043e\u0435 &#038;[] \u0432 \u043a\u043e\u043d\u0446\u0435 \u2014 \u044d\u0442\u043e \u043f\u0443\u0441\u0442\u043e\u0439 <a href=\"http:\/\/kgv.github.io\/rust_book_ru\/src\/primitive-types.html#%D0%A1%D1%80%D0%B5%D0%B7%D1%8B\">\u0441\u0440\u0435\u0437<\/a>. \u0423 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043d\u0435\u0442 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u043d\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u043c \u0438\u0445.<\/p>\n<p>  \u041f\u043e\u0447\u0435\u043c\u0443 \u0441\u0440\u0435\u0437, \u0430 \u043d\u0435 \u043c\u0430\u0441\u0441\u0438\u0432? \u0425\u043e\u0440\u043e\u0448\u0438\u0439 \u0441\u0442\u0438\u043b\u044c \u0432 Rust \u2014 \u043d\u0435 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u0432\u043b\u0430\u0434\u0435\u043d\u0438\u0435, \u0435\u0441\u043b\u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u043d\u0443\u0436\u043d\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f. \u0418\u043d\u0430\u0447\u0435 \u043d\u0430\u043c \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0431\u044b \u043a\u043b\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u0442.\u0435. \u043e\u043d\u0430 \u00ab\u043f\u043e\u0433\u043b\u043e\u0442\u0438\u043b\u0430\u00bb \u0431\u044b \u0435\u0433\u043e. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e \u0432\u043b\u0430\u0434\u0435\u043d\u0438\u0438 <a href=\"http:\/\/kgv.github.io\/rust_book_ru\/src\/ownership.html\">\u0447\u0438\u0442\u0430\u0439\u0442\u0435 \u0442\u0443\u0442<\/a>.<\/p>\n<p>  \u0414\u0430\u043b\u0435\u0435 \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0443\u044e \u0441\u043e\u0431\u043e\u0439 \u043d\u0430\u0448\u0443 \u0437\u0430\u043f\u0438\u0441\u044c, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0443:<\/p>\n<pre><code class=\"rust\">    let me = Person {         id: 0,         name: &quot;\u041c\u0438\u0445\u0430\u0438\u043b&quot;.to_string(),         data: None     }; <\/code><\/pre>\n<p>  \u041f\u0440\u0438\u043d\u0446\u0438\u043f\u0438\u0430\u043b\u044c\u043d\u043e, \u0441\u0435\u0439\u0447\u0430\u0441 \u0441\u043c\u044b\u0441\u043b\u0430 \u0441\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0442\u044c \u044d\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u043d\u0435\u0442, \u043d\u043e \u0434\u0430\u043b\u044c\u0448\u0435 \u044d\u0442\u043e \u043d\u0430\u043c \u043f\u043e\u043c\u043e\u0436\u0435\u0442. \u041a\u0441\u0442\u0430\u0442\u0438, \u0432\u043e\u0442 \u0435\u0451 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0435:<\/p>\n<pre><code class=\"rust\">struct Person {     id: i32,     name: String,     data: Option&lt;Vec&lt;u8&gt;&gt; } <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0432\u0441\u0442\u0430\u0432\u043a\u0443:<\/p>\n<pre><code class=\"rust\">    conn.execute(         &quot;INSERT INTO person (name, data) VALUES ($1, $2)&quot;,         &[&me.name, &me.data])         .unwrap(); <\/code><\/pre>\n<p>  \u0417\u0434\u0435\u0441\u044c \u0443\u0436\u0435 \u0443 \u043d\u0430\u0448\u0435\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0435\u0441\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b. \u041e\u043d\u0438 \u043f\u043e\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u043e\u0439 \u0438\u043d\u0442\u0435\u0440\u043f\u043e\u043b\u044f\u0446\u0438\u0438 \u0432 \u043d\u0443\u043c\u0435\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u044f $1, $2 \u0438 \u0442.\u0434. \u0418 \u0442\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u0448 \u0441\u0440\u0435\u0437 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043d\u0435 \u043f\u0443\u0441\u0442 \u2014 \u043e\u043d \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u043f\u043e\u043b\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b.<\/p>\n<p>  \u0414\u0430\u043b\u0435\u0435 \u043c\u044b \u043f\u043e\u0434\u0433\u043e\u0442\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0437\u0430\u043f\u0440\u043e\u0441 \u043a \u0431\u0430\u0437\u0435, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0442\u043e, \u0447\u0442\u043e \u0437\u0430\u043f\u0438\u0441\u0430\u043b\u0438:<\/p>\n<pre><code class=\"rust\">    let stmt = conn.prepare(&quot;SELECT id, name, data FROM person&quot;).unwrap(); <\/code><\/pre>\n<p>  \u0414\u0443\u043c\u0430\u044e, \u043d\u0438\u0447\u0435\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0433\u043e. \u042d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u0430-\u0437\u0430\u043f\u0440\u043e\u0441\u0430. \u041f\u043e\u0432\u0442\u043e\u0440\u044f\u044e\u0449\u0438\u0435\u0441\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0438\u043c\u0435\u0435\u0442 \u0441\u043c\u044b\u0441\u043b \u043d\u0435 \u043f\u0435\u0440\u0435\u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c, \u0430 \u0445\u0440\u0430\u043d\u0438\u0442\u044c, \u0434\u043b\u044f \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438. \u041c\u044b \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0433\u043b\u0438 \u0431\u044b \u0441\u0440\u0430\u0437\u0443 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441 \u0431\u0435\u0437 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u00ab\u043f\u0440\u0438\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430\u00bb.<\/p>\n<p>  \u0412 \u043a\u043e\u043d\u0446\u0435 \u043c\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0441\u0430\u043c \u0437\u0430\u043f\u0440\u043e\u0441. \u041f\u0440\u043e\u0439\u0434\u0451\u043c\u0441\u044f \u043f\u043e \u043a\u0430\u0436\u0434\u043e\u0439 \u0441\u0442\u0440\u043e\u0447\u043a\u0435:<\/p>\n<pre><code class=\"rust\">    for row in stmt.query(&[]).unwrap() { <\/code><\/pre>\n<p>  \u0417\u0434\u0435\u0441\u044c \u043c\u044b \u043e\u0431\u0445\u043e\u0434\u0438\u043c \u043c\u0430\u0441\u0441\u0438\u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u0437\u0430\u043f\u0440\u043e\u0441\u0430. \u041a\u0430\u043a \u0432\u0441\u0435\u0433\u0434\u0430, \u0437\u0430\u043f\u0440\u043e\u0441 \u043c\u043e\u0433 \u0431\u044b \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u044c\u0441\u044f \u043e\u0448\u0438\u0431\u043a\u043e\u0439. \u0421\u043f\u0438\u0441\u043e\u043a \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0441\u043d\u043e\u0432\u0430 \u043f\u0443\u0441\u0442 \u2014 &#038;[].<\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0441\u043d\u043e\u0432\u0430 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0438\u0437 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u0437\u0430\u043f\u0440\u043e\u0441\u0430.<\/p>\n<pre><code class=\"rust\">        let person = Person {             id: row.get(0),             name: row.get(1),             data: row.get(2)         }; <\/code><\/pre>\n<p>  \u0417\u0434\u0435\u0441\u044c \u043c\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u0431\u0435\u0440\u0451\u043c \u043f\u043e\u043b\u044f \u043f\u043e \u043d\u043e\u043c\u0435\u0440\u0430\u043c, \u043d\u043e \u0432\u043e\u043e\u0431\u0449\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438 \u0438\u043c\u0435\u043d\u0430 \u043f\u043e\u043b\u0435\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u044b.<\/p>\n<p>  \u041d\u0430\u043a\u043e\u043d\u0435\u0446, \u043f\u0435\u0447\u0430\u0442\u0430\u0435\u043c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0441 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c:<\/p>\n<pre><code class=\"rust\">        println!(&quot;\u041d\u0430\u0448\u043b\u0438 \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430: {}&quot;, person.name);     } } <\/code><\/pre>\n<p>  \u041f\u043e\u0441\u0442 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0441\u044f \u0434\u043b\u0438\u043d\u043d\u044b\u043c, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043c\u044b \u0437\u043d\u0430\u043a\u043e\u043c\u0438\u043b\u0438\u0441\u044c \u0441 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043e\u0439, \u0442\u0435\u0440\u043c\u0438\u043d\u043e\u043b\u043e\u0433\u0438\u0435\u0439 \u0438 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u043b\u0438 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435, \u043d\u043e, \u043d\u0430\u0434\u0435\u044e\u0441\u044c, \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043b\u0435\u0437\u0435\u043d \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0438\u043b\u043b\u044e\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u0440\u0430\u0431\u043e\u0447\u0435\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430.<\/p>\n<p>  \u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0447\u0430\u0441\u0442\u0438 \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0432 INI-\u0444\u0430\u0439\u043b\u0435. \u041e\u0441\u0442\u0430\u0432\u0430\u0439\u0442\u0435\u0441\u044c \u0441 \u043d\u0430\u043c\u0438!               <\/p>\n<div class=\"clear\"><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/267477\/\"> http:\/\/habrahabr.ru\/post\/267477\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>       \u0412\u0441\u0435\u043c \u043f\u0440\u0438\u0432\u0435\u0442.<\/p>\n<p>  \u041a\u0430\u043a\u043e\u0435-\u0442\u043e \u0432\u0440\u0435\u043c\u044f \u043d\u0430\u0437\u0430\u0434 \u044f \u0432\u0438\u0434\u0435\u043b \u0432 \u043d\u0435\u0431\u0435\u0437\u044b\u0437\u0432\u0435\u0441\u0442\u043d\u043e\u043c \u0431\u043b\u043e\u0433\u0435 <a href=\"http:\/\/eax.me\/go-databases\/\">\u043f\u043e\u0441\u0442 \u043e \u0442\u043e\u043c<\/a>, \u043a\u0430\u043a \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0430 Go \u043f\u0440\u043e\u0441\u0442\u0443\u044e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443, \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0443\u044e \u0441 \u0411\u0414, \u0430 \u0437\u0430\u0442\u0435\u043c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0430 \u0435\u0451 \u0431\u0430\u0437\u0435 \u0446\u0435\u043b\u044b\u0439 <a href=\"http:\/\/eax.me\/go-rest-service\/\">REST-\u0441\u0435\u0440\u0432\u0438\u0441<\/a>. \u042f \u0440\u0435\u0448\u0438\u043b \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u043b\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u0443\u044e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u043d\u0430 Rust \u0438 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u043c\u0438.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/8f1\/360\/29d\/8f136029d86046d1bdb236a5f9da9af9.png\" height=\"66%\" width=\"66%\"\/><\/p>\n<p>  \u041c\u044b \u043d\u0430\u0447\u043d\u0451\u043c \u0441 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0411\u0414 \u0438 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043e\u0431\u044b\u0447\u043d\u043e\u0435 \u043a\u043e\u043d\u0441\u043e\u043b\u044c\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0430 \u0437\u0430\u0442\u0435\u043c \u0434\u043e\u0431\u0430\u0432\u0438\u043c, \u0442\u0430\u043a \u0441\u043a\u0430\u0437\u0430\u0442\u044c, REST-\u0444\u0440\u043e\u043d\u0442\u0435\u043d\u0434.  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-266240","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/266240","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=266240"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/266240\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=266240"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=266240"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=266240"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}