<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>plarail_hangout</author_name>
  <author_url>https://blog.hatena.ne.jp/plarail_hangout/</author_url>
  <blog_title>Engineering Tech Dojo</blog_title>
  <blog_url>https://tech.fun-toy-life.com/</blog_url>
  <categories>
    <anon>Rust</anon>
  </categories>
  <description>Rustの配列（array）初期化まとめ：[T; N]の書き方 はじめに Rustの配列（[T; N]）はサイズがコンパイル時に決まる固定長のデータ構造です。スタック上に確保されるためVecより軽量ですが、サイズの扱いにRust特有のルールがあります。 この記事では配列の初期化パターンをまとめて解説します。動的にサイズが変わるVecについては「RustのVec初期化まとめ：vec!マクロからVec::newまで」を参照してください。 基本的な書き方 値を列挙して初期化する let a: [i32; 5] = [1, 2, 3, 4, 5]; println!(&quot;{:?}&quot;, a); // [1…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftech.fun-toy-life.com%2Fentry%2F2026%2F05%2F19%2F081811&quot; title=&quot;Rustの配列（array）初期化まとめ：[T; N]の書き方 - Engineering Tech Dojo&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>2026-05-19 08:18:11</published>
  <title>Rustの配列（array）初期化まとめ：[T; N]の書き方</title>
  <type>rich</type>
  <url>https://tech.fun-toy-life.com/entry/2026/05/19/081811</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
