<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>agtn</author_name>
  <author_url>https://blog.hatena.ne.jp/agtn/</author_url>
  <blog_title>右上↗</blog_title>
  <blog_url>https://agtn.hatenablog.com/</blog_url>
  <categories>
  </categories>
  <description>プログラムを書いていると何かしら木構造っぽいものやグラフっぽいものを作りたい場面が多々あると思います． Rust は所有権や Size の都合で，これらを作ろうと思うと地味にハマるのでまとめておきます． Rust で木構造 最も単純な木構造は Rust だと enum Tree&lt;T&gt; { Leaf(T), Node(Box&lt;Tree&lt;T&gt;&gt;, Box&lt;Tree&lt;T&gt;&gt;), } といった形で表せます． Rust では明示的に boxing してあげないと再帰的なデータ構造は作れないのでちょっと複雑に見えるかもしれませんが，まぁ単純です． この木構造を書き換えたい場合は，ownership をとっ…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fagtn.hatenablog.com%2Fentry%2F2017%2F01%2F16%2F151745&quot; title=&quot;Rust でグラフ構造や木構造を作る - 右上↗&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>2017-01-16 15:17:45</published>
  <title>Rust でグラフ構造や木構造を作る</title>
  <type>rich</type>
  <url>https://agtn.hatenablog.com/entry/2017/01/16/151745</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
