<?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>Axum on Kenno&#39;s Open Note</title>
    <link>https://blog.khmersite.net/tags/axum/</link>
    <description>Recent content in Axum 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>Fri, 12 Jul 2024 16:41:07 +1000</lastBuildDate>
    <atom:link href="https://blog.khmersite.net/tags/axum/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Axum custom request extractor and validator using FromRequest</title>
      <link>https://blog.khmersite.net/p/axum-request-extractor-using-fromrequest/</link>
      <pubDate>Fri, 12 Jul 2024 16:41:07 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/axum-request-extractor-using-fromrequest/</guid>
      <description>&lt;p&gt;This post documents what I learned about creating custom Axum extractor which can be used with the &lt;code&gt;validator&lt;/code&gt; for validation.&lt;/p&gt;
&lt;p&gt;Create a new test project:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;➜ cargo new request-validator
cd request-validator
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The first crate to be added is &lt;code&gt;axum&lt;/code&gt; for Axum framework.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;request-validator on  main [?] via 🦀 v1.79.0
➜ cargo add axum
    Updating crates.io index
      Adding axum v0.7.5 to dependencies
             Features:
             + form
             + http1
             + json
             + matched-path
             + original-uri
             + query
             + tokio
             + tower-log
             + tracing
             - __private_docs
             - http2
             - macros
             - multipart
             - ws
    Updating crates.io index
     Locking 82 packages to latest compatible versions
...
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;We also need &lt;code&gt;tokio&lt;/code&gt; crate that works together with &lt;code&gt;axum&lt;/code&gt;.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
