<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>inon29</author_name>
  <author_url>https://blog.hatena.ne.jp/inon29/</author_url>
  <blog_title>It’s now or never</blog_title>
  <blog_url>https://inon29.hateblo.jp/</blog_url>
  <categories>
    <anon>Rust</anon>
  </categories>
  <description>RustにおけるResultを使った、エラーハンドリングの基本的な部分についてまとめておく。 Result型 doc.rust-lang.org Rustには、エラーハンドリングのための特別な型、Resultが用意されている。 enum Result&lt;T, E&gt; { Ok(T), Err(E), } Okバリアントは操作が成功した場合に使用され、Errバリアントはエラーが発生した場合に使用される。 [例] use std::fs; use std::io; fn read_file_content(file_path: &amp;str) -&gt; Result&lt;String, io::Error&gt; { …</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Finon29.hateblo.jp%2Fentry%2F2023%2F10%2F22%2F132548&quot; title=&quot;RustによるResult型のエラーハンドリングの入門 - It’s now or never&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2023-10-22 13:25:48</published>
  <title>RustによるResult型のエラーハンドリングの入門</title>
  <type>rich</type>
  <url>https://inon29.hateblo.jp/entry/2023/10/22/132548</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
