<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Actix on Kenno&#39;s Open Note</title>
    <link>https://blog.khmersite.net/tags/actix/</link>
    <description>Recent content in Actix on Kenno&#39;s Open Note</description>
    <image>
      <title>Kenno&#39;s Open Note</title>
      <url>https://blog.khmersite.net/%3Clink%20or%20path%20of%20image%20for%20opengraph,%20twitter-cards%3E</url>
      <link>https://blog.khmersite.net/%3Clink%20or%20path%20of%20image%20for%20opengraph,%20twitter-cards%3E</link>
    </image>
    <generator>Hugo -- 0.154.0</generator>
    <language>en</language>
    <lastBuildDate>Wed, 22 May 2024 22:46:23 +1000</lastBuildDate>
    <atom:link href="https://blog.khmersite.net/tags/actix/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Rust cannot find derive macro `Serialize` in this scope</title>
      <link>https://blog.khmersite.net/p/rust-cannot-derive-macro-in-this-scope/</link>
      <pubDate>Wed, 22 May 2024 22:46:23 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/rust-cannot-derive-macro-in-this-scope/</guid>
      <description>&lt;p&gt;While trying out some Rust exercises, I came across the following error:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ cargo run --bin iter2
   Compiling tutor-web-app-ssr v0.1.0 (/home/kenno/dev/rust/chapter7/ezytutors/tutor-web-app-ssr)
error: cannot find derive macro `Serialize` in this scope
  --&amp;gt; tutor-web-app-ssr/src/bin/iter2.rs:17:10
   |
17 | #[derive(Serialize, Deserialize)]
   |          ^^^^^^^^^
   |
note: `Serialize` is imported here, but it is only a trait, without a derive macro
  --&amp;gt; tutor-web-app-ssr/src/bin/iter2.rs:5:26
   |
5  | use serde::{Deserialize, Serialize};
   |                          ^^^^^^^^^

error: cannot find derive macro `Deserialize` in this scope
  --&amp;gt; tutor-web-app-ssr/src/bin/iter2.rs:17:21
   |
17 | #[derive(Serialize, Deserialize)]

&amp;lt;SNIP&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;This happened because I didn&amp;rsquo;t specify the required dependency feature for &lt;code&gt;serde&lt;/code&gt; crate. Here is what I had in &lt;code&gt;Cargo.toml&lt;/code&gt; when the above error occurred:&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
