You've already forked oath-authenticator
mirror of
https://github.com/trussed-dev/oath-authenticator.git
synced 2026-03-11 16:35:53 -07:00
1968 lines
806 KiB
HTML
1968 lines
806 KiB
HTML
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Struct representing a generic array - `GenericArray<T, N>` works like [T; N]"><meta name="keywords" content="rust, rustlang, rust-lang, GenericArray"><title>GenericArray in generic_array - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceSerif4-Regular-1f7d512b176f0f72.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceSerif4-Bold-124a1ca42af929b6.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../static.files/rustdoc-6827029ac823cab7.css" id="mainThemeStyle"><link rel="stylesheet" id="themeStyle" href="../static.files/light-ebce58d0a40c3431.css"><link rel="stylesheet" disabled href="../static.files/dark-f23faae4a2daf9a6.css"><link rel="stylesheet" disabled href="../static.files/ayu-8af5e100b21cd173.css"><script id="default-settings" ></script><script src="../static.files/storage-d43fa987303ecbbb.js"></script><script defer src="sidebar-items.js"></script><script defer src="../static.files/main-c55e1eb52e1886b4.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-13285aec31fa243e.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">☰</button><a class="sidebar-logo" href="../generic_array/index.html"><div class="logo-container"><img class="rust-logo" src="../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></div></a><h2></h2></nav><nav class="sidebar"><a class="sidebar-logo" href="../generic_array/index.html"><div class="logo-container"><img class="rust-logo" src="../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></div></a><h2 class="location"><a href="#">GenericArray</a></h2><div class="sidebar-elems"><section><h3><a href="#implementations">Methods</a></h3><ul class="block"><li><a href="#method.as_mut_slice">as_mut_slice</a></li><li><a href="#method.as_slice">as_slice</a></li><li><a href="#method.clone_from_slice">clone_from_slice</a></li><li><a href="#method.from_exact_iter">from_exact_iter</a></li><li><a href="#method.from_mut_slice">from_mut_slice</a></li><li><a href="#method.from_slice">from_slice</a></li></ul><h3><a href="#deref-methods-%5BT%5D">Methods from Deref<Target=[T]></a></h3><ul class="block"><li><a href="#method.align_to">align_to</a></li><li><a href="#method.align_to_mut">align_to_mut</a></li><li><a href="#method.array_chunks">array_chunks</a></li><li><a href="#method.array_chunks_mut">array_chunks_mut</a></li><li><a href="#method.array_windows">array_windows</a></li><li><a href="#method.as_chunks">as_chunks</a></li><li><a href="#method.as_chunks_mut">as_chunks_mut</a></li><li><a href="#method.as_chunks_unchecked">as_chunks_unchecked</a></li><li><a href="#method.as_chunks_unchecked_mut">as_chunks_unchecked_mut</a></li><li><a href="#method.as_mut_ptr">as_mut_ptr</a></li><li><a href="#method.as_mut_ptr_range">as_mut_ptr_range</a></li><li><a href="#method.as_ptr">as_ptr</a></li><li><a href="#method.as_ptr_range">as_ptr_range</a></li><li><a href="#method.as_rchunks">as_rchunks</a></li><li><a href="#method.as_rchunks_mut">as_rchunks_mut</a></li><li><a href="#method.as_simd">as_simd</a></li><li><a href="#method.as_simd_mut">as_simd_mut</a></li><li><a href="#method.binary_search">binary_search</a></li><li><a href="#method.binary_search_by">binary_search_by</a></li><li><a href="#method.binary_search_by_key">binary_search_by_key</a></li><li><a href="#method.chunks">chunks</a></li><li><a href="#method.chunks_exact">chunks_exact</a></li><li><a href="#method.chunks_exact_mut">chunks_exact_mut</a></li><li><a href="#method.chunks_mut">chunks_mut</a></li><li><a href="#method.clone_from_slice-1">clone_from_slice</a></li><li><a href="#method.contains">contains</a></li><li><a href="#method.copy_from_slice">copy_from_slice</a></li><li><a href="#method.copy_within">copy_within</a></li><li><a href="#method.ends_with">ends_with</a></li><li><a href="#method.eq_ignore_ascii_case">eq_ignore_ascii_case</a></li><li><a href="#method.escape_ascii">escape_ascii</a></li><li><a href="#method.fill">fill</a></li><li><a href="#method.fill_with">fill_with</a></li><li><a href="#method.first">first</a></li><li><a href="#method.first_mut">first_mut</a></li><li><a href="#method.flatten">flatten</a></li><li><a href="#method.flatten_mut">flatten_mut</a></li><li><a href="#method.get">get</a></li><li><a href="#method.get_many_mut">get_many_mut</a></li><li><a href="#method.get_many_unchecked_mut">get_many_unchecked_mut</a></li><li><a href="#method.get_mut">get_mut</a></li><li><a href="#method.get_unchecked">get_unchecked</a></li><li><a href="#method.get_unchecked_mut">get_unchecked_mut</a></li><li><a href="#method.group_by">group_by</a></li><li><a href="#method.group_by_mut">group_by_mut</a></li><li><a href="#method.is_ascii">is_ascii</a></li><li><a href="#method.is_empty">is_empty</a></li><li><a href="#method.is_sorted">is_sorted</a></li><li><a href="#method.is_sorted_by">is_sorted_by</a></li><li><a href="#method.is_sorted_by_key">is_sorted_by_key</a></li><li><a href="#method.iter">iter</a></li><li><a href="#method.iter_mut">iter_mut</a></li><li><a href="#method.last">last</a></li><li><a href="#method.last_mut">last_mut</a></li><li><a href="#method.len">len</a></li><li><a href="#method.make_ascii_lowercase">make_ascii_lowercase</a></li><li><a href="#method.make_ascii_uppercase">make_ascii_uppercase</a></li><li><a href="#method.partition_dedup">partition_dedup</a></li><li><a href="#method.partition_dedup_by">partition_dedup_by</a></li><li><a href="#method.partition_dedup_by_key">partition_dedup_by_key</a></li><li><a href="#method.partition_point">partition_point</a></li><li><a href="#method.rchunks">rchunks</a></li><li><a href="#method.rchunks_exact">rchunks_exact</a></li><li><a href="#method.rchunks_exact_mut">rchunks_exact_mut</a></li><li><a href="#method.rchunks_mut">rchunks_mut</a></li><li><a href="#method.reverse">reverse</a></li><li><a href="#method.rotate_left">rotate_left</a></li><li><a href="#method.rotate_right">rotate_right</a></li><li><a href="#method.rsplit">rsplit</a></li><li><a href="#method.rsplit_array_mut">rsplit_array_mut</a></li><li><a href="#method.rsplit_array_ref">rsplit_array_ref</a></li><li><a href="#method.rsplit_mut">rsplit_mut</a></li><li><a href="#method.rsplitn">rsplitn</a></li><li><a href="#method.rsplitn_mut">rsplitn_mut</a></li><li><a href="#method.select_nth_unstable">select_nth_unstable</a></li><li><a href="#method.select_nth_unstable_by">select_nth_unstable_by</a></li><li><a href="#method.select_nth_unstable_by_key">select_nth_unstable_by_key</a></li><li><a href="#method.sort_floats">sort_floats</a></li><li><a href="#method.sort_floats-1">sort_floats</a></li><li><a href="#method.sort_unstable">sort_unstable</a></li><li><a href="#method.sort_unstable_by">sort_unstable_by</a></li><li><a href="#method.sort_unstable_by_key">sort_unstable_by_key</a></li><li><a href="#method.split">split</a></li><li><a href="#method.split_array_mut">split_array_mut</a></li><li><a href="#method.split_array_ref">split_array_ref</a></li><li><a href="#method.split_at">split_at</a></li><li><a href="#method.split_at_mut">split_at_mut</a></li><li><a href="#method.split_at_mut_unchecked">split_at_mut_unchecked</a></li><li><a href="#method.split_at_unchecked">split_at_unchecked</a></li><li><a href="#method.split_first">split_first</a></li><li><a href="#method.split_first_mut">split_first_mut</a></li><li><a href="#method.split_inclusive">split_inclusive</a></li><li><a href="#method.split_inclusive_mut">split_inclusive_mut</a></li><li><a href="#method.split_last">split_last</a></li><li><a href="#method.split_last_mut">split_last_mut</a></li><li><a href="#method.split_mut">split_mut</a></li><li><a href="#method.splitn">splitn</a></li><li><a href="#method.splitn_mut">splitn_mut</a></li><li><a href="#method.starts_with">starts_with</a></li><li><a href="#method.strip_prefix">strip_prefix</a></li><li><a href="#method.strip_suffix">strip_suffix</a></li><li><a href="#method.swap">swap</a></li><li><a href="#method.swap_unchecked">swap_unchecked</a></li><li><a href="#method.swap_with_slice">swap_with_slice</a></li><li><a href="#method.take">take</a></li><li><a href="#method.take_first">take_first</a></li><li><a href="#method.take_first_mut">take_first_mut</a></li><li><a href="#method.take_last">take_last</a></li><li><a href="#method.take_last_mut">take_last_mut</a></li><li><a href="#method.take_mut">take_mut</a></li><li><a href="#method.trim_ascii">trim_ascii</a></li><li><a href="#method.trim_ascii_end">trim_ascii_end</a></li><li><a href="#method.trim_ascii_start">trim_ascii_start</a></li><li><a href="#method.windows">windows</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block"><li><a href="#impl-AsMut%3C%5BT%3B%201%5D%3E-for-GenericArray%3CT%2C%20U1%3E">AsMut<[T; 1]></a></li><li><a href="#impl-AsMut%3C%5BT%3B%2010%5D%3E-for-GenericArray%3CT%2C%20U10%3E">AsMut<[T; 10]></a></li><li><a href="#impl-AsMut%3C%5BT%3B%2011%5D%3E-for-GenericArray%3CT%2C%20U11%3E">AsMut<[T; 11]></a></li><li><a href="#impl-AsMut%3C%5BT%3B%2012%5D%3E-for-GenericArray%3CT%2C%20U12%3E">AsMut<[T; 12]></a></li><li><a href="#impl-AsMut%3C%5BT%3B%2013%5D%3E-for-GenericArray%3CT%2C%20U13%3E">AsMut<[T; 13]></a></li><li><a href="#impl-AsMut%3C%5BT%3B%2014%5D%3E-for-GenericArray%3CT%2C%20U14%3E">AsMut<[T; 14]></a></li><li><a href="#impl-AsMut%3C%5BT%3B%2015%5D%3E-for-GenericArray%3CT%2C%20U15%3E">AsMut<[T; 15]></a></li><li><a href="#impl-AsMut%3C%5BT%3B%2016%5D%3E-for-GenericArray%3CT%2C%20U16%3E">AsMut<[T; 16]></a></li><li><a href="#impl-AsMut%3C%5BT%3B%2017%5D%3E-for-GenericArray%3CT%2C%20U17%3E">AsMut<[T; 17]></a></li><li><a href="#impl-AsMut%3C%5BT%3B%2018%5D%3E-for-GenericArray%3CT%2C%20U18%3E">AsMut<[T; 18]></a></li><li><a href="#impl-AsMut%3C%5BT%3B%2019%5D%3E-for-GenericArray%3CT%2C%20U19%3E">AsMut<[T; 19]></a></li><li><a href="#impl-AsMut%3C%5BT%3B%202%5D%3E-for-GenericArray%3CT%2C%20U2%3E">AsMut<[T; 2]></a></li><li><a href="#impl-AsMut%3C%5BT%3B%2020%5D%3E-for-GenericArray%3CT%2C%20U20%3E">AsMut<[T; 20]></a></li><li><a href="#impl-AsMut%3C%5BT%3B%2021%5D%3E-for-GenericArray%3CT%2C%20U21%3E">AsMut<[T; 21]></a></li><li><a href="#impl-AsMut%3C%5BT%3B%2022%5D%3E-for-GenericArray%3CT%2C%20U22%3E">AsMut<[T; 22]></a></li><li><a href="#impl-AsMut%3C%5BT%3B%2023%5D%3E-for-GenericArray%3CT%2C%20U23%3E">AsMut<[T; 23]></a></li><li><a href="#impl-AsMut%3C%5BT%3B%2024%5D%3E-for-GenericArray%3CT%2C%20U24%3E">AsMut<[T; 24]></a></li><li><a href="#impl-AsMut%3C%5BT%3B%2025%5D%3E-for-GenericArray%3CT%2C%20U25%3E">AsMut<[T; 25]></a></li><li><a href="#impl-AsMut%3C%5BT%3B%2026%5D%3E-for-GenericArray%3CT%2C%20U26%3E">AsMut<[T; 26]></a></li><li><a href="#impl-AsMut%3C%5BT%3B%2027%5D%3E-for-GenericArray%3CT%2C%20U27%3E">AsMut<[T; 27]></a></li><li><a href="#impl-AsMut%3C%5BT%3B%2028%5D%3E-for-GenericArray%3CT%2C%20U28%3E">AsMut<[T; 28]></a></li><li><a href="#impl-AsMut%3C%5BT%3B%2029%5D%3E-for-GenericArray%3CT%2C%20U29%3E">AsMut<[T; 29]></a></li><li><a href="#impl-AsMut%3C%5BT%3B%203%5D%3E-for-GenericArray%3CT%2C%20U3%3E">AsMut<[T; 3]></a></li><li><a href="#impl-AsMut%3C%5BT%3B%2030%5D%3E-for-GenericArray%3CT%2C%20U30%3E">AsMut<[T; 30]></a></li><li><a href="#impl-AsMut%3C%5BT%3B%2031%5D%3E-for-GenericArray%3CT%2C%20U31%3E">AsMut<[T; 31]></a></li><li><a href="#impl-AsMut%3C%5BT%3B%2032%5D%3E-for-GenericArray%3CT%2C%20U32%3E">AsMut<[T; 32]></a></li><li><a href="#impl-AsMut%3C%5BT%3B%204%5D%3E-for-GenericArray%3CT%2C%20U4%3E">AsMut<[T; 4]></a></li><li><a href="#impl-AsMut%3C%5BT%3B%205%5D%3E-for-GenericArray%3CT%2C%20U5%3E">AsMut<[T; 5]></a></li><li><a href="#impl-AsMut%3C%5BT%3B%206%5D%3E-for-GenericArray%3CT%2C%20U6%3E">AsMut<[T; 6]></a></li><li><a href="#impl-AsMut%3C%5BT%3B%207%5D%3E-for-GenericArray%3CT%2C%20U7%3E">AsMut<[T; 7]></a></li><li><a href="#impl-AsMut%3C%5BT%3B%208%5D%3E-for-GenericArray%3CT%2C%20U8%3E">AsMut<[T; 8]></a></li><li><a href="#impl-AsMut%3C%5BT%3B%209%5D%3E-for-GenericArray%3CT%2C%20U9%3E">AsMut<[T; 9]></a></li><li><a href="#impl-AsMut%3C%5BT%5D%3E-for-GenericArray%3CT%2C%20N%3E">AsMut<[T]></a></li><li><a href="#impl-AsRef%3C%5BT%3B%201%5D%3E-for-GenericArray%3CT%2C%20U1%3E">AsRef<[T; 1]></a></li><li><a href="#impl-AsRef%3C%5BT%3B%2010%5D%3E-for-GenericArray%3CT%2C%20U10%3E">AsRef<[T; 10]></a></li><li><a href="#impl-AsRef%3C%5BT%3B%2011%5D%3E-for-GenericArray%3CT%2C%20U11%3E">AsRef<[T; 11]></a></li><li><a href="#impl-AsRef%3C%5BT%3B%2012%5D%3E-for-GenericArray%3CT%2C%20U12%3E">AsRef<[T; 12]></a></li><li><a href="#impl-AsRef%3C%5BT%3B%2013%5D%3E-for-GenericArray%3CT%2C%20U13%3E">AsRef<[T; 13]></a></li><li><a href="#impl-AsRef%3C%5BT%3B%2014%5D%3E-for-GenericArray%3CT%2C%20U14%3E">AsRef<[T; 14]></a></li><li><a href="#impl-AsRef%3C%5BT%3B%2015%5D%3E-for-GenericArray%3CT%2C%20U15%3E">AsRef<[T; 15]></a></li><li><a href="#impl-AsRef%3C%5BT%3B%2016%5D%3E-for-GenericArray%3CT%2C%20U16%3E">AsRef<[T; 16]></a></li><li><a href="#impl-AsRef%3C%5BT%3B%2017%5D%3E-for-GenericArray%3CT%2C%20U17%3E">AsRef<[T; 17]></a></li><li><a href="#impl-AsRef%3C%5BT%3B%2018%5D%3E-for-GenericArray%3CT%2C%20U18%3E">AsRef<[T; 18]></a></li><li><a href="#impl-AsRef%3C%5BT%3B%2019%5D%3E-for-GenericArray%3CT%2C%20U19%3E">AsRef<[T; 19]></a></li><li><a href="#impl-AsRef%3C%5BT%3B%202%5D%3E-for-GenericArray%3CT%2C%20U2%3E">AsRef<[T; 2]></a></li><li><a href="#impl-AsRef%3C%5BT%3B%2020%5D%3E-for-GenericArray%3CT%2C%20U20%3E">AsRef<[T; 20]></a></li><li><a href="#impl-AsRef%3C%5BT%3B%2021%5D%3E-for-GenericArray%3CT%2C%20U21%3E">AsRef<[T; 21]></a></li><li><a href="#impl-AsRef%3C%5BT%3B%2022%5D%3E-for-GenericArray%3CT%2C%20U22%3E">AsRef<[T; 22]></a></li><li><a href="#impl-AsRef%3C%5BT%3B%2023%5D%3E-for-GenericArray%3CT%2C%20U23%3E">AsRef<[T; 23]></a></li><li><a href="#impl-AsRef%3C%5BT%3B%2024%5D%3E-for-GenericArray%3CT%2C%20U24%3E">AsRef<[T; 24]></a></li><li><a href="#impl-AsRef%3C%5BT%3B%2025%5D%3E-for-GenericArray%3CT%2C%20U25%3E">AsRef<[T; 25]></a></li><li><a href="#impl-AsRef%3C%5BT%3B%2026%5D%3E-for-GenericArray%3CT%2C%20U26%3E">AsRef<[T; 26]></a></li><li><a href="#impl-AsRef%3C%5BT%3B%2027%5D%3E-for-GenericArray%3CT%2C%20U27%3E">AsRef<[T; 27]></a></li><li><a href="#impl-AsRef%3C%5BT%3B%2028%5D%3E-for-GenericArray%3CT%2C%20U28%3E">AsRef<[T; 28]></a></li><li><a href="#impl-AsRef%3C%5BT%3B%2029%5D%3E-for-GenericArray%3CT%2C%20U29%3E">AsRef<[T; 29]></a></li><li><a href="#impl-AsRef%3C%5BT%3B%203%5D%3E-for-GenericArray%3CT%2C%20U3%3E">AsRef<[T; 3]></a></li><li><a href="#impl-AsRef%3C%5BT%3B%2030%5D%3E-for-GenericArray%3CT%2C%20U30%3E">AsRef<[T; 30]></a></li><li><a href="#impl-AsRef%3C%5BT%3B%2031%5D%3E-for-GenericArray%3CT%2C%20U31%3E">AsRef<[T; 31]></a></li><li><a href="#impl-AsRef%3C%5BT%3B%2032%5D%3E-for-GenericArray%3CT%2C%20U32%3E">AsRef<[T; 32]></a></li><li><a href="#impl-AsRef%3C%5BT%3B%204%5D%3E-for-GenericArray%3CT%2C%20U4%3E">AsRef<[T; 4]></a></li><li><a href="#impl-AsRef%3C%5BT%3B%205%5D%3E-for-GenericArray%3CT%2C%20U5%3E">AsRef<[T; 5]></a></li><li><a href="#impl-AsRef%3C%5BT%3B%206%5D%3E-for-GenericArray%3CT%2C%20U6%3E">AsRef<[T; 6]></a></li><li><a href="#impl-AsRef%3C%5BT%3B%207%5D%3E-for-GenericArray%3CT%2C%20U7%3E">AsRef<[T; 7]></a></li><li><a href="#impl-AsRef%3C%5BT%3B%208%5D%3E-for-GenericArray%3CT%2C%20U8%3E">AsRef<[T; 8]></a></li><li><a href="#impl-AsRef%3C%5BT%3B%209%5D%3E-for-GenericArray%3CT%2C%20U9%3E">AsRef<[T; 9]></a></li><li><a href="#impl-AsRef%3C%5BT%5D%3E-for-GenericArray%3CT%2C%20N%3E">AsRef<[T]></a></li><li><a href="#impl-Borrow%3C%5BT%5D%3E-for-GenericArray%3CT%2C%20N%3E">Borrow<[T]></a></li><li><a href="#impl-BorrowMut%3C%5BT%5D%3E-for-GenericArray%3CT%2C%20N%3E">BorrowMut<[T]></a></li><li><a href="#impl-Clone-for-GenericArray%3CT%2C%20N%3E">Clone</a></li><li><a href="#impl-Concat%3CT%2C%20M%3E-for-GenericArray%3CT%2C%20N%3E">Concat<T, M></a></li><li><a href="#impl-Copy-for-GenericArray%3CT%2C%20N%3E">Copy</a></li><li><a href="#impl-Debug-for-GenericArray%3CT%2C%20N%3E">Debug</a></li><li><a href="#impl-Default-for-GenericArray%3CT%2C%20N%3E">Default</a></li><li><a href="#impl-Deref-for-GenericArray%3CT%2C%20N%3E">Deref</a></li><li><a href="#impl-DerefMut-for-GenericArray%3CT%2C%20N%3E">DerefMut</a></li><li><a href="#impl-Eq-for-GenericArray%3CT%2C%20N%3E">Eq</a></li><li><a href="#impl-From%3C%26%27a%20%5BT%3B%201%5D%3E-for-%26%27a%20GenericArray%3CT%2C%20U1%3E">From<&'a [T; 1]></a></li><li><a href="#impl-From%3C%26%27a%20%5BT%3B%2010%5D%3E-for-%26%27a%20GenericArray%3CT%2C%20U10%3E">From<&'a [T; 10]></a></li><li><a href="#impl-From%3C%26%27a%20%5BT%3B%2011%5D%3E-for-%26%27a%20GenericArray%3CT%2C%20U11%3E">From<&'a [T; 11]></a></li><li><a href="#impl-From%3C%26%27a%20%5BT%3B%2012%5D%3E-for-%26%27a%20GenericArray%3CT%2C%20U12%3E">From<&'a [T; 12]></a></li><li><a href="#impl-From%3C%26%27a%20%5BT%3B%2013%5D%3E-for-%26%27a%20GenericArray%3CT%2C%20U13%3E">From<&'a [T; 13]></a></li><li><a href="#impl-From%3C%26%27a%20%5BT%3B%2014%5D%3E-for-%26%27a%20GenericArray%3CT%2C%20U14%3E">From<&'a [T; 14]></a></li><li><a href="#impl-From%3C%26%27a%20%5BT%3B%2015%5D%3E-for-%26%27a%20GenericArray%3CT%2C%20U15%3E">From<&'a [T; 15]></a></li><li><a href="#impl-From%3C%26%27a%20%5BT%3B%2016%5D%3E-for-%26%27a%20GenericArray%3CT%2C%20U16%3E">From<&'a [T; 16]></a></li><li><a href="#impl-From%3C%26%27a%20%5BT%3B%2017%5D%3E-for-%26%27a%20GenericArray%3CT%2C%20U17%3E">From<&'a [T; 17]></a></li><li><a href="#impl-From%3C%26%27a%20%5BT%3B%2018%5D%3E-for-%26%27a%20GenericArray%3CT%2C%20U18%3E">From<&'a [T; 18]></a></li><li><a href="#impl-From%3C%26%27a%20%5BT%3B%2019%5D%3E-for-%26%27a%20GenericArray%3CT%2C%20U19%3E">From<&'a [T; 19]></a></li><li><a href="#impl-From%3C%26%27a%20%5BT%3B%202%5D%3E-for-%26%27a%20GenericArray%3CT%2C%20U2%3E">From<&'a [T; 2]></a></li><li><a href="#impl-From%3C%26%27a%20%5BT%3B%2020%5D%3E-for-%26%27a%20GenericArray%3CT%2C%20U20%3E">From<&'a [T; 20]></a></li><li><a href="#impl-From%3C%26%27a%20%5BT%3B%2021%5D%3E-for-%26%27a%20GenericArray%3CT%2C%20U21%3E">From<&'a [T; 21]></a></li><li><a href="#impl-From%3C%26%27a%20%5BT%3B%2022%5D%3E-for-%26%27a%20GenericArray%3CT%2C%20U22%3E">From<&'a [T; 22]></a></li><li><a href="#impl-From%3C%26%27a%20%5BT%3B%2023%5D%3E-for-%26%27a%20GenericArray%3CT%2C%20U23%3E">From<&'a [T; 23]></a></li><li><a href="#impl-From%3C%26%27a%20%5BT%3B%2024%5D%3E-for-%26%27a%20GenericArray%3CT%2C%20U24%3E">From<&'a [T; 24]></a></li><li><a href="#impl-From%3C%26%27a%20%5BT%3B%2025%5D%3E-for-%26%27a%20GenericArray%3CT%2C%20U25%3E">From<&'a [T; 25]></a></li><li><a href="#impl-From%3C%26%27a%20%5BT%3B%2026%5D%3E-for-%26%27a%20GenericArray%3CT%2C%20U26%3E">From<&'a [T; 26]></a></li><li><a href="#impl-From%3C%26%27a%20%5BT%3B%2027%5D%3E-for-%26%27a%20GenericArray%3CT%2C%20U27%3E">From<&'a [T; 27]></a></li><li><a href="#impl-From%3C%26%27a%20%5BT%3B%2028%5D%3E-for-%26%27a%20GenericArray%3CT%2C%20U28%3E">From<&'a [T; 28]></a></li><li><a href="#impl-From%3C%26%27a%20%5BT%3B%2029%5D%3E-for-%26%27a%20GenericArray%3CT%2C%20U29%3E">From<&'a [T; 29]></a></li><li><a href="#impl-From%3C%26%27a%20%5BT%3B%203%5D%3E-for-%26%27a%20GenericArray%3CT%2C%20U3%3E">From<&'a [T; 3]></a></li><li><a href="#impl-From%3C%26%27a%20%5BT%3B%2030%5D%3E-for-%26%27a%20GenericArray%3CT%2C%20U30%3E">From<&'a [T; 30]></a></li><li><a href="#impl-From%3C%26%27a%20%5BT%3B%2031%5D%3E-for-%26%27a%20GenericArray%3CT%2C%20U31%3E">From<&'a [T; 31]></a></li><li><a href="#impl-From%3C%26%27a%20%5BT%3B%2032%5D%3E-for-%26%27a%20GenericArray%3CT%2C%20U32%3E">From<&'a [T; 32]></a></li><li><a href="#impl-From%3C%26%27a%20%5BT%3B%204%5D%3E-for-%26%27a%20GenericArray%3CT%2C%20U4%3E">From<&'a [T; 4]></a></li><li><a href="#impl-From%3C%26%27a%20%5BT%3B%205%5D%3E-for-%26%27a%20GenericArray%3CT%2C%20U5%3E">From<&'a [T; 5]></a></li><li><a href="#impl-From%3C%26%27a%20%5BT%3B%206%5D%3E-for-%26%27a%20GenericArray%3CT%2C%20U6%3E">From<&'a [T; 6]></a></li><li><a href="#impl-From%3C%26%27a%20%5BT%3B%207%5D%3E-for-%26%27a%20GenericArray%3CT%2C%20U7%3E">From<&'a [T; 7]></a></li><li><a href="#impl-From%3C%26%27a%20%5BT%3B%208%5D%3E-for-%26%27a%20GenericArray%3CT%2C%20U8%3E">From<&'a [T; 8]></a></li><li><a href="#impl-From%3C%26%27a%20%5BT%3B%209%5D%3E-for-%26%27a%20GenericArray%3CT%2C%20U9%3E">From<&'a [T; 9]></a></li><li><a href="#impl-From%3C%26%27a%20%5BT%5D%3E-for-%26%27a%20GenericArray%3CT%2C%20N%3E">From<&'a [T]></a></li><li><a href="#impl-From%3C%26%27a%20mut%20%5BT%3B%201%5D%3E-for-%26%27a%20mut%20GenericArray%3CT%2C%20U1%3E">From<&'a mut [T; 1]></a></li><li><a href="#impl-From%3C%26%27a%20mut%20%5BT%3B%2010%5D%3E-for-%26%27a%20mut%20GenericArray%3CT%2C%20U10%3E">From<&'a mut [T; 10]></a></li><li><a href="#impl-From%3C%26%27a%20mut%20%5BT%3B%2011%5D%3E-for-%26%27a%20mut%20GenericArray%3CT%2C%20U11%3E">From<&'a mut [T; 11]></a></li><li><a href="#impl-From%3C%26%27a%20mut%20%5BT%3B%2012%5D%3E-for-%26%27a%20mut%20GenericArray%3CT%2C%20U12%3E">From<&'a mut [T; 12]></a></li><li><a href="#impl-From%3C%26%27a%20mut%20%5BT%3B%2013%5D%3E-for-%26%27a%20mut%20GenericArray%3CT%2C%20U13%3E">From<&'a mut [T; 13]></a></li><li><a href="#impl-From%3C%26%27a%20mut%20%5BT%3B%2014%5D%3E-for-%26%27a%20mut%20GenericArray%3CT%2C%20U14%3E">From<&'a mut [T; 14]></a></li><li><a href="#impl-From%3C%26%27a%20mut%20%5BT%3B%2015%5D%3E-for-%26%27a%20mut%20GenericArray%3CT%2C%20U15%3E">From<&'a mut [T; 15]></a></li><li><a href="#impl-From%3C%26%27a%20mut%20%5BT%3B%2016%5D%3E-for-%26%27a%20mut%20GenericArray%3CT%2C%20U16%3E">From<&'a mut [T; 16]></a></li><li><a href="#impl-From%3C%26%27a%20mut%20%5BT%3B%2017%5D%3E-for-%26%27a%20mut%20GenericArray%3CT%2C%20U17%3E">From<&'a mut [T; 17]></a></li><li><a href="#impl-From%3C%26%27a%20mut%20%5BT%3B%2018%5D%3E-for-%26%27a%20mut%20GenericArray%3CT%2C%20U18%3E">From<&'a mut [T; 18]></a></li><li><a href="#impl-From%3C%26%27a%20mut%20%5BT%3B%2019%5D%3E-for-%26%27a%20mut%20GenericArray%3CT%2C%20U19%3E">From<&'a mut [T; 19]></a></li><li><a href="#impl-From%3C%26%27a%20mut%20%5BT%3B%202%5D%3E-for-%26%27a%20mut%20GenericArray%3CT%2C%20U2%3E">From<&'a mut [T; 2]></a></li><li><a href="#impl-From%3C%26%27a%20mut%20%5BT%3B%2020%5D%3E-for-%26%27a%20mut%20GenericArray%3CT%2C%20U20%3E">From<&'a mut [T; 20]></a></li><li><a href="#impl-From%3C%26%27a%20mut%20%5BT%3B%2021%5D%3E-for-%26%27a%20mut%20GenericArray%3CT%2C%20U21%3E">From<&'a mut [T; 21]></a></li><li><a href="#impl-From%3C%26%27a%20mut%20%5BT%3B%2022%5D%3E-for-%26%27a%20mut%20GenericArray%3CT%2C%20U22%3E">From<&'a mut [T; 22]></a></li><li><a href="#impl-From%3C%26%27a%20mut%20%5BT%3B%2023%5D%3E-for-%26%27a%20mut%20GenericArray%3CT%2C%20U23%3E">From<&'a mut [T; 23]></a></li><li><a href="#impl-From%3C%26%27a%20mut%20%5BT%3B%2024%5D%3E-for-%26%27a%20mut%20GenericArray%3CT%2C%20U24%3E">From<&'a mut [T; 24]></a></li><li><a href="#impl-From%3C%26%27a%20mut%20%5BT%3B%2025%5D%3E-for-%26%27a%20mut%20GenericArray%3CT%2C%20U25%3E">From<&'a mut [T; 25]></a></li><li><a href="#impl-From%3C%26%27a%20mut%20%5BT%3B%2026%5D%3E-for-%26%27a%20mut%20GenericArray%3CT%2C%20U26%3E">From<&'a mut [T; 26]></a></li><li><a href="#impl-From%3C%26%27a%20mut%20%5BT%3B%2027%5D%3E-for-%26%27a%20mut%20GenericArray%3CT%2C%20U27%3E">From<&'a mut [T; 27]></a></li><li><a href="#impl-From%3C%26%27a%20mut%20%5BT%3B%2028%5D%3E-for-%26%27a%20mut%20GenericArray%3CT%2C%20U28%3E">From<&'a mut [T; 28]></a></li><li><a href="#impl-From%3C%26%27a%20mut%20%5BT%3B%2029%5D%3E-for-%26%27a%20mut%20GenericArray%3CT%2C%20U29%3E">From<&'a mut [T; 29]></a></li><li><a href="#impl-From%3C%26%27a%20mut%20%5BT%3B%203%5D%3E-for-%26%27a%20mut%20GenericArray%3CT%2C%20U3%3E">From<&'a mut [T; 3]></a></li><li><a href="#impl-From%3C%26%27a%20mut%20%5BT%3B%2030%5D%3E-for-%26%27a%20mut%20GenericArray%3CT%2C%20U30%3E">From<&'a mut [T; 30]></a></li><li><a href="#impl-From%3C%26%27a%20mut%20%5BT%3B%2031%5D%3E-for-%26%27a%20mut%20GenericArray%3CT%2C%20U31%3E">From<&'a mut [T; 31]></a></li><li><a href="#impl-From%3C%26%27a%20mut%20%5BT%3B%2032%5D%3E-for-%26%27a%20mut%20GenericArray%3CT%2C%20U32%3E">From<&'a mut [T; 32]></a></li><li><a href="#impl-From%3C%26%27a%20mut%20%5BT%3B%204%5D%3E-for-%26%27a%20mut%20GenericArray%3CT%2C%20U4%3E">From<&'a mut [T; 4]></a></li><li><a href="#impl-From%3C%26%27a%20mut%20%5BT%3B%205%5D%3E-for-%26%27a%20mut%20GenericArray%3CT%2C%20U5%3E">From<&'a mut [T; 5]></a></li><li><a href="#impl-From%3C%26%27a%20mut%20%5BT%3B%206%5D%3E-for-%26%27a%20mut%20GenericArray%3CT%2C%20U6%3E">From<&'a mut [T; 6]></a></li><li><a href="#impl-From%3C%26%27a%20mut%20%5BT%3B%207%5D%3E-for-%26%27a%20mut%20GenericArray%3CT%2C%20U7%3E">From<&'a mut [T; 7]></a></li><li><a href="#impl-From%3C%26%27a%20mut%20%5BT%3B%208%5D%3E-for-%26%27a%20mut%20GenericArray%3CT%2C%20U8%3E">From<&'a mut [T; 8]></a></li><li><a href="#impl-From%3C%26%27a%20mut%20%5BT%3B%209%5D%3E-for-%26%27a%20mut%20GenericArray%3CT%2C%20U9%3E">From<&'a mut [T; 9]></a></li><li><a href="#impl-From%3C%26%27a%20mut%20%5BT%5D%3E-for-%26%27a%20mut%20GenericArray%3CT%2C%20N%3E">From<&'a mut [T]></a></li><li><a href="#impl-From%3C%5BT%3B%201%5D%3E-for-GenericArray%3CT%2C%20U1%3E">From<[T; 1]></a></li><li><a href="#impl-From%3C%5BT%3B%2010%5D%3E-for-GenericArray%3CT%2C%20U10%3E">From<[T; 10]></a></li><li><a href="#impl-From%3C%5BT%3B%2011%5D%3E-for-GenericArray%3CT%2C%20U11%3E">From<[T; 11]></a></li><li><a href="#impl-From%3C%5BT%3B%2012%5D%3E-for-GenericArray%3CT%2C%20U12%3E">From<[T; 12]></a></li><li><a href="#impl-From%3C%5BT%3B%2013%5D%3E-for-GenericArray%3CT%2C%20U13%3E">From<[T; 13]></a></li><li><a href="#impl-From%3C%5BT%3B%2014%5D%3E-for-GenericArray%3CT%2C%20U14%3E">From<[T; 14]></a></li><li><a href="#impl-From%3C%5BT%3B%2015%5D%3E-for-GenericArray%3CT%2C%20U15%3E">From<[T; 15]></a></li><li><a href="#impl-From%3C%5BT%3B%2016%5D%3E-for-GenericArray%3CT%2C%20U16%3E">From<[T; 16]></a></li><li><a href="#impl-From%3C%5BT%3B%2017%5D%3E-for-GenericArray%3CT%2C%20U17%3E">From<[T; 17]></a></li><li><a href="#impl-From%3C%5BT%3B%2018%5D%3E-for-GenericArray%3CT%2C%20U18%3E">From<[T; 18]></a></li><li><a href="#impl-From%3C%5BT%3B%2019%5D%3E-for-GenericArray%3CT%2C%20U19%3E">From<[T; 19]></a></li><li><a href="#impl-From%3C%5BT%3B%202%5D%3E-for-GenericArray%3CT%2C%20U2%3E">From<[T; 2]></a></li><li><a href="#impl-From%3C%5BT%3B%2020%5D%3E-for-GenericArray%3CT%2C%20U20%3E">From<[T; 20]></a></li><li><a href="#impl-From%3C%5BT%3B%2021%5D%3E-for-GenericArray%3CT%2C%20U21%3E">From<[T; 21]></a></li><li><a href="#impl-From%3C%5BT%3B%2022%5D%3E-for-GenericArray%3CT%2C%20U22%3E">From<[T; 22]></a></li><li><a href="#impl-From%3C%5BT%3B%2023%5D%3E-for-GenericArray%3CT%2C%20U23%3E">From<[T; 23]></a></li><li><a href="#impl-From%3C%5BT%3B%2024%5D%3E-for-GenericArray%3CT%2C%20U24%3E">From<[T; 24]></a></li><li><a href="#impl-From%3C%5BT%3B%2025%5D%3E-for-GenericArray%3CT%2C%20U25%3E">From<[T; 25]></a></li><li><a href="#impl-From%3C%5BT%3B%2026%5D%3E-for-GenericArray%3CT%2C%20U26%3E">From<[T; 26]></a></li><li><a href="#impl-From%3C%5BT%3B%2027%5D%3E-for-GenericArray%3CT%2C%20U27%3E">From<[T; 27]></a></li><li><a href="#impl-From%3C%5BT%3B%2028%5D%3E-for-GenericArray%3CT%2C%20U28%3E">From<[T; 28]></a></li><li><a href="#impl-From%3C%5BT%3B%2029%5D%3E-for-GenericArray%3CT%2C%20U29%3E">From<[T; 29]></a></li><li><a href="#impl-From%3C%5BT%3B%203%5D%3E-for-GenericArray%3CT%2C%20U3%3E">From<[T; 3]></a></li><li><a href="#impl-From%3C%5BT%3B%2030%5D%3E-for-GenericArray%3CT%2C%20U30%3E">From<[T; 30]></a></li><li><a href="#impl-From%3C%5BT%3B%2031%5D%3E-for-GenericArray%3CT%2C%20U31%3E">From<[T; 31]></a></li><li><a href="#impl-From%3C%5BT%3B%2032%5D%3E-for-GenericArray%3CT%2C%20U32%3E">From<[T; 32]></a></li><li><a href="#impl-From%3C%5BT%3B%204%5D%3E-for-GenericArray%3CT%2C%20U4%3E">From<[T; 4]></a></li><li><a href="#impl-From%3C%5BT%3B%205%5D%3E-for-GenericArray%3CT%2C%20U5%3E">From<[T; 5]></a></li><li><a href="#impl-From%3C%5BT%3B%206%5D%3E-for-GenericArray%3CT%2C%20U6%3E">From<[T; 6]></a></li><li><a href="#impl-From%3C%5BT%3B%207%5D%3E-for-GenericArray%3CT%2C%20U7%3E">From<[T; 7]></a></li><li><a href="#impl-From%3C%5BT%3B%208%5D%3E-for-GenericArray%3CT%2C%20U8%3E">From<[T; 8]></a></li><li><a href="#impl-From%3C%5BT%3B%209%5D%3E-for-GenericArray%3CT%2C%20U9%3E">From<[T; 9]></a></li><li><a href="#impl-From%3CGenericArray%3CT%2C%20UInt%3CUInt%3CUInt%3CUInt%3CUInt%3CUInt%3CUTerm%2C%20B1%3E%2C%20B0%3E%2C%20B0%3E%2C%20B0%3E%2C%20B0%3E%2C%20B0%3E%3E%3E-for-%5BT%3B%2032%5D">From<GenericArray<T, UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>>></a></li><li><a href="#impl-From%3CGenericArray%3CT%2C%20UInt%3CUInt%3CUInt%3CUInt%3CUInt%3CUTerm%2C%20B1%3E%2C%20B0%3E%2C%20B0%3E%2C%20B0%3E%2C%20B0%3E%3E%3E-for-%5BT%3B%2016%5D">From<GenericArray<T, UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>>></a></li><li><a href="#impl-From%3CGenericArray%3CT%2C%20UInt%3CUInt%3CUInt%3CUInt%3CUInt%3CUTerm%2C%20B1%3E%2C%20B0%3E%2C%20B0%3E%2C%20B0%3E%2C%20B1%3E%3E%3E-for-%5BT%3B%2017%5D">From<GenericArray<T, UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B1>>></a></li><li><a href="#impl-From%3CGenericArray%3CT%2C%20UInt%3CUInt%3CUInt%3CUInt%3CUInt%3CUTerm%2C%20B1%3E%2C%20B0%3E%2C%20B0%3E%2C%20B1%3E%2C%20B0%3E%3E%3E-for-%5BT%3B%2018%5D">From<GenericArray<T, UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B1>, B0>>></a></li><li><a href="#impl-From%3CGenericArray%3CT%2C%20UInt%3CUInt%3CUInt%3CUInt%3CUInt%3CUTerm%2C%20B1%3E%2C%20B0%3E%2C%20B0%3E%2C%20B1%3E%2C%20B1%3E%3E%3E-for-%5BT%3B%2019%5D">From<GenericArray<T, UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B1>, B1>>></a></li><li><a href="#impl-From%3CGenericArray%3CT%2C%20UInt%3CUInt%3CUInt%3CUInt%3CUInt%3CUTerm%2C%20B1%3E%2C%20B0%3E%2C%20B1%3E%2C%20B0%3E%2C%20B0%3E%3E%3E-for-%5BT%3B%2020%5D">From<GenericArray<T, UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B1>, B0>, B0>>></a></li><li><a href="#impl-From%3CGenericArray%3CT%2C%20UInt%3CUInt%3CUInt%3CUInt%3CUInt%3CUTerm%2C%20B1%3E%2C%20B0%3E%2C%20B1%3E%2C%20B0%3E%2C%20B1%3E%3E%3E-for-%5BT%3B%2021%5D">From<GenericArray<T, UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B1>, B0>, B1>>></a></li><li><a href="#impl-From%3CGenericArray%3CT%2C%20UInt%3CUInt%3CUInt%3CUInt%3CUInt%3CUTerm%2C%20B1%3E%2C%20B0%3E%2C%20B1%3E%2C%20B1%3E%2C%20B0%3E%3E%3E-for-%5BT%3B%2022%5D">From<GenericArray<T, UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B1>, B1>, B0>>></a></li><li><a href="#impl-From%3CGenericArray%3CT%2C%20UInt%3CUInt%3CUInt%3CUInt%3CUInt%3CUTerm%2C%20B1%3E%2C%20B0%3E%2C%20B1%3E%2C%20B1%3E%2C%20B1%3E%3E%3E-for-%5BT%3B%2023%5D">From<GenericArray<T, UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B1>, B1>, B1>>></a></li><li><a href="#impl-From%3CGenericArray%3CT%2C%20UInt%3CUInt%3CUInt%3CUInt%3CUInt%3CUTerm%2C%20B1%3E%2C%20B1%3E%2C%20B0%3E%2C%20B0%3E%2C%20B0%3E%3E%3E-for-%5BT%3B%2024%5D">From<GenericArray<T, UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B1>, B0>, B0>, B0>>></a></li><li><a href="#impl-From%3CGenericArray%3CT%2C%20UInt%3CUInt%3CUInt%3CUInt%3CUInt%3CUTerm%2C%20B1%3E%2C%20B1%3E%2C%20B0%3E%2C%20B0%3E%2C%20B1%3E%3E%3E-for-%5BT%3B%2025%5D">From<GenericArray<T, UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B1>, B0>, B0>, B1>>></a></li><li><a href="#impl-From%3CGenericArray%3CT%2C%20UInt%3CUInt%3CUInt%3CUInt%3CUInt%3CUTerm%2C%20B1%3E%2C%20B1%3E%2C%20B0%3E%2C%20B1%3E%2C%20B0%3E%3E%3E-for-%5BT%3B%2026%5D">From<GenericArray<T, UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B1>, B0>, B1>, B0>>></a></li><li><a href="#impl-From%3CGenericArray%3CT%2C%20UInt%3CUInt%3CUInt%3CUInt%3CUInt%3CUTerm%2C%20B1%3E%2C%20B1%3E%2C%20B0%3E%2C%20B1%3E%2C%20B1%3E%3E%3E-for-%5BT%3B%2027%5D">From<GenericArray<T, UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B1>, B0>, B1>, B1>>></a></li><li><a href="#impl-From%3CGenericArray%3CT%2C%20UInt%3CUInt%3CUInt%3CUInt%3CUInt%3CUTerm%2C%20B1%3E%2C%20B1%3E%2C%20B1%3E%2C%20B0%3E%2C%20B0%3E%3E%3E-for-%5BT%3B%2028%5D">From<GenericArray<T, UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B1>, B1>, B0>, B0>>></a></li><li><a href="#impl-From%3CGenericArray%3CT%2C%20UInt%3CUInt%3CUInt%3CUInt%3CUInt%3CUTerm%2C%20B1%3E%2C%20B1%3E%2C%20B1%3E%2C%20B0%3E%2C%20B1%3E%3E%3E-for-%5BT%3B%2029%5D">From<GenericArray<T, UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B1>, B1>, B0>, B1>>></a></li><li><a href="#impl-From%3CGenericArray%3CT%2C%20UInt%3CUInt%3CUInt%3CUInt%3CUInt%3CUTerm%2C%20B1%3E%2C%20B1%3E%2C%20B1%3E%2C%20B1%3E%2C%20B0%3E%3E%3E-for-%5BT%3B%2030%5D">From<GenericArray<T, UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B1>, B1>, B1>, B0>>></a></li><li><a href="#impl-From%3CGenericArray%3CT%2C%20UInt%3CUInt%3CUInt%3CUInt%3CUInt%3CUTerm%2C%20B1%3E%2C%20B1%3E%2C%20B1%3E%2C%20B1%3E%2C%20B1%3E%3E%3E-for-%5BT%3B%2031%5D">From<GenericArray<T, UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B1>, B1>, B1>, B1>>></a></li><li><a href="#impl-From%3CGenericArray%3CT%2C%20UInt%3CUInt%3CUInt%3CUInt%3CUTerm%2C%20B1%3E%2C%20B0%3E%2C%20B0%3E%2C%20B0%3E%3E%3E-for-%5BT%3B%208%5D">From<GenericArray<T, UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>>></a></li><li><a href="#impl-From%3CGenericArray%3CT%2C%20UInt%3CUInt%3CUInt%3CUInt%3CUTerm%2C%20B1%3E%2C%20B0%3E%2C%20B0%3E%2C%20B1%3E%3E%3E-for-%5BT%3B%209%5D">From<GenericArray<T, UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B1>>></a></li><li><a href="#impl-From%3CGenericArray%3CT%2C%20UInt%3CUInt%3CUInt%3CUInt%3CUTerm%2C%20B1%3E%2C%20B0%3E%2C%20B1%3E%2C%20B0%3E%3E%3E-for-%5BT%3B%2010%5D">From<GenericArray<T, UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B1>, B0>>></a></li><li><a href="#impl-From%3CGenericArray%3CT%2C%20UInt%3CUInt%3CUInt%3CUInt%3CUTerm%2C%20B1%3E%2C%20B0%3E%2C%20B1%3E%2C%20B1%3E%3E%3E-for-%5BT%3B%2011%5D">From<GenericArray<T, UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B1>, B1>>></a></li><li><a href="#impl-From%3CGenericArray%3CT%2C%20UInt%3CUInt%3CUInt%3CUInt%3CUTerm%2C%20B1%3E%2C%20B1%3E%2C%20B0%3E%2C%20B0%3E%3E%3E-for-%5BT%3B%2012%5D">From<GenericArray<T, UInt<UInt<UInt<UInt<UTerm, B1>, B1>, B0>, B0>>></a></li><li><a href="#impl-From%3CGenericArray%3CT%2C%20UInt%3CUInt%3CUInt%3CUInt%3CUTerm%2C%20B1%3E%2C%20B1%3E%2C%20B0%3E%2C%20B1%3E%3E%3E-for-%5BT%3B%2013%5D">From<GenericArray<T, UInt<UInt<UInt<UInt<UTerm, B1>, B1>, B0>, B1>>></a></li><li><a href="#impl-From%3CGenericArray%3CT%2C%20UInt%3CUInt%3CUInt%3CUInt%3CUTerm%2C%20B1%3E%2C%20B1%3E%2C%20B1%3E%2C%20B0%3E%3E%3E-for-%5BT%3B%2014%5D">From<GenericArray<T, UInt<UInt<UInt<UInt<UTerm, B1>, B1>, B1>, B0>>></a></li><li><a href="#impl-From%3CGenericArray%3CT%2C%20UInt%3CUInt%3CUInt%3CUInt%3CUTerm%2C%20B1%3E%2C%20B1%3E%2C%20B1%3E%2C%20B1%3E%3E%3E-for-%5BT%3B%2015%5D">From<GenericArray<T, UInt<UInt<UInt<UInt<UTerm, B1>, B1>, B1>, B1>>></a></li><li><a href="#impl-From%3CGenericArray%3CT%2C%20UInt%3CUInt%3CUInt%3CUTerm%2C%20B1%3E%2C%20B0%3E%2C%20B0%3E%3E%3E-for-%5BT%3B%204%5D">From<GenericArray<T, UInt<UInt<UInt<UTerm, B1>, B0>, B0>>></a></li><li><a href="#impl-From%3CGenericArray%3CT%2C%20UInt%3CUInt%3CUInt%3CUTerm%2C%20B1%3E%2C%20B0%3E%2C%20B1%3E%3E%3E-for-%5BT%3B%205%5D">From<GenericArray<T, UInt<UInt<UInt<UTerm, B1>, B0>, B1>>></a></li><li><a href="#impl-From%3CGenericArray%3CT%2C%20UInt%3CUInt%3CUInt%3CUTerm%2C%20B1%3E%2C%20B1%3E%2C%20B0%3E%3E%3E-for-%5BT%3B%206%5D">From<GenericArray<T, UInt<UInt<UInt<UTerm, B1>, B1>, B0>>></a></li><li><a href="#impl-From%3CGenericArray%3CT%2C%20UInt%3CUInt%3CUInt%3CUTerm%2C%20B1%3E%2C%20B1%3E%2C%20B1%3E%3E%3E-for-%5BT%3B%207%5D">From<GenericArray<T, UInt<UInt<UInt<UTerm, B1>, B1>, B1>>></a></li><li><a href="#impl-From%3CGenericArray%3CT%2C%20UInt%3CUInt%3CUTerm%2C%20B1%3E%2C%20B0%3E%3E%3E-for-%5BT%3B%202%5D">From<GenericArray<T, UInt<UInt<UTerm, B1>, B0>>></a></li><li><a href="#impl-From%3CGenericArray%3CT%2C%20UInt%3CUInt%3CUTerm%2C%20B1%3E%2C%20B1%3E%3E%3E-for-%5BT%3B%203%5D">From<GenericArray<T, UInt<UInt<UTerm, B1>, B1>>></a></li><li><a href="#impl-From%3CGenericArray%3CT%2C%20UInt%3CUTerm%2C%20B1%3E%3E%3E-for-%5BT%3B%201%5D">From<GenericArray<T, UInt<UTerm, B1>>></a></li><li><a href="#impl-FromIterator%3CT%3E-for-GenericArray%3CT%2C%20N%3E">FromIterator<T></a></li><li><a href="#impl-FunctionalSequence%3CT%3E-for-GenericArray%3CT%2C%20N%3E">FunctionalSequence<T></a></li><li><a href="#impl-GenericSequence%3CT%3E-for-GenericArray%3CT%2C%20N%3E">GenericSequence<T></a></li><li><a href="#impl-Hash-for-GenericArray%3CT%2C%20N%3E">Hash</a></li><li><a href="#impl-IntoIterator-for-%26%27a%20GenericArray%3CT%2C%20N%3E">IntoIterator</a></li><li><a href="#impl-IntoIterator-for-%26%27a%20mut%20GenericArray%3CT%2C%20N%3E">IntoIterator</a></li><li><a href="#impl-IntoIterator-for-GenericArray%3CT%2C%20N%3E">IntoIterator</a></li><li><a href="#impl-Lengthen%3CT%3E-for-GenericArray%3CT%2C%20N%3E">Lengthen<T></a></li><li><a href="#impl-LowerHex-for-GenericArray%3Cu8%2C%20T%3E">LowerHex</a></li><li><a href="#impl-MappedGenericSequence%3CT%2C%20U%3E-for-GenericArray%3CT%2C%20N%3E">MappedGenericSequence<T, U></a></li><li><a href="#impl-Ord-for-GenericArray%3CT%2C%20N%3E">Ord</a></li><li><a href="#impl-PartialEq%3CGenericArray%3CT%2C%20N%3E%3E-for-GenericArray%3CT%2C%20N%3E">PartialEq<GenericArray<T, N>></a></li><li><a href="#impl-PartialOrd%3CGenericArray%3CT%2C%20N%3E%3E-for-GenericArray%3CT%2C%20N%3E">PartialOrd<GenericArray<T, N>></a></li><li><a href="#impl-Send-for-GenericArray%3CT%2C%20N%3E">Send</a></li><li><a href="#impl-Shorten%3CT%3E-for-GenericArray%3CT%2C%20N%3E">Shorten<T></a></li><li><a href="#impl-Split%3CT%2C%20K%3E-for-%26%27a%20GenericArray%3CT%2C%20N%3E">Split<T, K></a></li><li><a href="#impl-Split%3CT%2C%20K%3E-for-%26%27a%20mut%20GenericArray%3CT%2C%20N%3E">Split<T, K></a></li><li><a href="#impl-Split%3CT%2C%20K%3E-for-GenericArray%3CT%2C%20N%3E">Split<T, K></a></li><li><a href="#impl-Sync-for-GenericArray%3CT%2C%20N%3E">Sync</a></li><li><a href="#impl-UpperHex-for-GenericArray%3Cu8%2C%20T%3E">UpperHex</a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block"><li><a href="#impl-RefUnwindSafe-for-GenericArray%3CT%2C%20U%3E">RefUnwindSafe</a></li><li><a href="#impl-Unpin-for-GenericArray%3CT%2C%20U%3E">Unpin</a></li><li><a href="#impl-UnwindSafe-for-GenericArray%3CT%2C%20U%3E">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block"><li><a href="#impl-Any-for-GenericArray%3CT%2C%20U%3E">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-GenericArray%3CT%2C%20U%3E">Borrow<T></a></li><li><a href="#impl-BorrowMut%3CT%3E-for-GenericArray%3CT%2C%20U%3E">BorrowMut<T></a></li><li><a href="#impl-From%3CT%3E-for-GenericArray%3CT%2C%20U%3E">From<T></a></li><li><a href="#impl-Into%3CU%3E-for-GenericArray%3CT%2C%20U%3E">Into<U></a></li><li><a href="#impl-Same%3CT%3E-for-GenericArray%3CT%2C%20U%3E">Same<T></a></li><li><a href="#impl-TryFrom%3CU%3E-for-GenericArray%3CT%2C%20U%3E">TryFrom<U></a></li><li><a href="#impl-TryInto%3CU%3E-for-GenericArray%3CT%2C%20U%3E">TryInto<U></a></li></ul></section><h2><a href="index.html">In generic_array</a></h2></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../static.files/wheel-5ec35bf9ca753509.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn">Struct <a href="index.html">generic_array</a>::<wbr><a class="struct" href="#">GenericArray</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="srclink" href="../src/generic_array/lib.rs.html#178-180">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><div class="item-decl"><pre class="rust struct"><code><div class="code-attribute">#[repr(transparent)]</div>pub struct GenericArray<T, U: <a class="trait" href="trait.ArrayLength.html" title="trait generic_array::ArrayLength">ArrayLength</a><T>> { /* private fields */ }</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Struct representing a generic array - <code>GenericArray<T, N></code> works like [T; N]</p>
|
||
</div></details><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor">§</a></h2><div id="implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-GenericArray%3CT%2C%20N%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/lib.rs.html#526-557">source</a><a href="#impl-GenericArray%3CT%2C%20N%3E" class="anchor">§</a><h3 class="code-header">impl<T, N> <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, N><span class="where fmt-newline">where<br> N: <a class="trait" href="trait.ArrayLength.html" title="trait generic_array::ArrayLength">ArrayLength</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_slice" class="method has-srclink"><a class="srclink rightside" href="../src/generic_array/lib.rs.html#532-534">source</a><h4 class="code-header">pub fn <a href="#method.as_slice" class="fn">as_slice</a>(&self) -> &<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html">[T]</a></h4></section></summary><div class="docblock"><p>Extracts a slice containing the entire array.</p>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_mut_slice" class="method has-srclink"><a class="srclink rightside" href="../src/generic_array/lib.rs.html#538-540">source</a><h4 class="code-header">pub fn <a href="#method.as_mut_slice" class="fn">as_mut_slice</a>(&mut self) -> &mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html">[T]</a></h4></section></summary><div class="docblock"><p>Extracts a mutable slice containing the entire array.</p>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from_slice" class="method has-srclink"><a class="srclink rightside" href="../src/generic_array/lib.rs.html#546-548">source</a><h4 class="code-header">pub fn <a href="#method.from_slice" class="fn">from_slice</a>(slice: &<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html">[T]</a>) -> &<a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, N></h4></section></summary><div class="docblock"><p>Converts slice to a generic array reference with inferred length;</p>
|
||
<p>Length of the slice must be equal to the length of the array.</p>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from_mut_slice" class="method has-srclink"><a class="srclink rightside" href="../src/generic_array/lib.rs.html#554-556">source</a><h4 class="code-header">pub fn <a href="#method.from_mut_slice" class="fn">from_mut_slice</a>(slice: &mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html">[T]</a>) -> &mut <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, N></h4></section></summary><div class="docblock"><p>Converts mutable slice to a mutable generic array reference</p>
|
||
<p>Length of the slice must be equal to the length of the array.</p>
|
||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-GenericArray%3CT%2C%20N%3E-1" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/lib.rs.html#583-595">source</a><a href="#impl-GenericArray%3CT%2C%20N%3E-1" class="anchor">§</a><h3 class="code-header">impl<T: <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>, N> <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, N><span class="where fmt-newline">where<br> N: <a class="trait" href="trait.ArrayLength.html" title="trait generic_array::ArrayLength">ArrayLength</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.clone_from_slice" class="method has-srclink"><a class="srclink rightside" href="../src/generic_array/lib.rs.html#591-594">source</a><h4 class="code-header">pub fn <a href="#method.clone_from_slice" class="fn">clone_from_slice</a>(list: &<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html">[T]</a>) -> <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, N></h4></section></summary><div class="docblock"><p>Construct a <code>GenericArray</code> from a slice by cloning its content</p>
|
||
<p>Length of the slice must be equal to the length of the array</p>
|
||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-GenericArray%3CT%2C%20N%3E-2" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/lib.rs.html#597-636">source</a><a href="#impl-GenericArray%3CT%2C%20N%3E-2" class="anchor">§</a><h3 class="code-header">impl<T, N> <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, N><span class="where fmt-newline">where<br> N: <a class="trait" href="trait.ArrayLength.html" title="trait generic_array::ArrayLength">ArrayLength</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from_exact_iter" class="method has-srclink"><a class="srclink rightside" href="../src/generic_array/lib.rs.html#604-635">source</a><h4 class="code-header">pub fn <a href="#method.from_exact_iter" class="fn">from_exact_iter</a><I>(iter: I) -> <a class="enum" href="https://doc.rust-lang.org/1.67.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><Self><span class="where fmt-newline">where<br> I: <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a><Item = T>,</span></h4></section></summary><div class="docblock"><p>Creates a new <code>GenericArray</code> instance from an iterator with a specific size.</p>
|
||
<p>Returns <code>None</code> if the size is not equal to the number of elements in the <code>GenericArray</code>.</p>
|
||
</div></details></div></details></div><h2 id="deref-methods-%5BT%5D" class="small-section-header"><span>Methods from <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/ops/deref/trait.Deref.html" title="trait core::ops::deref::Deref">Deref</a><Target = <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html">[T]</a>></span><a href="#deref-methods-%5BT%5D" class="anchor">§</a></h2><div id="deref-methods-%5BT%5D-1"><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sort_floats" class="method has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.67.0/src/core/slice/mod.rs.html#4306">source</a><h4 class="code-header">pub fn <a href="#method.sort_floats" class="fn">sort_floats</a>(&mut self)</h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>sort_floats</code>)</span></div></span></summary><div class="docblock"><p>Sorts the slice of floats.</p>
|
||
<p>This sort is in-place (i.e. does not allocate), <em>O</em>(<em>n</em> * log(<em>n</em>)) worst-case, and uses
|
||
the ordering defined by <a href="https://doc.rust-lang.org/1.67.0/core/primitive.f64.html#method.total_cmp" title="f64::total_cmp"><code>f64::total_cmp</code></a>.</p>
|
||
<h5 id="current-implementation"><a href="#current-implementation">Current implementation</a></h5>
|
||
<p>This uses the same sorting algorithm as <a href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html#method.sort_unstable_by"><code>sort_unstable_by</code></a>.</p>
|
||
<h5 id="examples"><a href="#examples">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(sort_floats)]
|
||
</span><span class="kw">let </span><span class="kw-2">mut </span>v = [<span class="number">2.6</span>, -<span class="number">5e-8</span>, f64::NAN, <span class="number">8.29</span>, f64::INFINITY, -<span class="number">1.0</span>, <span class="number">0.0</span>, -f64::INFINITY, -<span class="number">0.0</span>];
|
||
|
||
v.sort_floats();
|
||
<span class="kw">let </span>sorted = [-f64::INFINITY, -<span class="number">1.0</span>, -<span class="number">5e-8</span>, -<span class="number">0.0</span>, <span class="number">0.0</span>, <span class="number">2.6</span>, <span class="number">8.29</span>, f64::INFINITY, f64::NAN];
|
||
<span class="macro">assert_eq!</span>(<span class="kw-2">&</span>v[..<span class="number">8</span>], <span class="kw-2">&</span>sorted[..<span class="number">8</span>]);
|
||
<span class="macro">assert!</span>(v[<span class="number">8</span>].is_nan());</code></pre></div>
|
||
</div></details></div><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.is_ascii" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.23.0">1.23.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.67.0/src/core/slice/ascii.rs.html#15">source</a></span><h4 class="code-header">pub fn <a href="#method.is_ascii" class="fn">is_ascii</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Checks if all bytes in this slice are within the ASCII range.</p>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.eq_ignore_ascii_case" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.23.0">1.23.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.67.0/src/core/slice/ascii.rs.html#26">source</a></span><h4 class="code-header">pub fn <a href="#method.eq_ignore_ascii_case" class="fn">eq_ignore_ascii_case</a>(&self, other: &[<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.u8.html">u8</a>]) -> <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Checks that two slices are an ASCII case-insensitive match.</p>
|
||
<p>Same as <code>to_ascii_lowercase(a) == to_ascii_lowercase(b)</code>,
|
||
but without allocating and copying temporaries.</p>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.make_ascii_uppercase" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.23.0">1.23.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.67.0/src/core/slice/ascii.rs.html#41">source</a></span><h4 class="code-header">pub fn <a href="#method.make_ascii_uppercase" class="fn">make_ascii_uppercase</a>(&mut self)</h4></section></summary><div class="docblock"><p>Converts this slice to its ASCII upper case equivalent in-place.</p>
|
||
<p>ASCII letters ‘a’ to ‘z’ are mapped to ‘A’ to ‘Z’,
|
||
but non-ASCII letters are unchanged.</p>
|
||
<p>To return a new uppercased value without modifying the existing one, use
|
||
<a href="#method.to_ascii_uppercase"><code>to_ascii_uppercase</code></a>.</p>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.make_ascii_lowercase" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.23.0">1.23.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.67.0/src/core/slice/ascii.rs.html#58">source</a></span><h4 class="code-header">pub fn <a href="#method.make_ascii_lowercase" class="fn">make_ascii_lowercase</a>(&mut self)</h4></section></summary><div class="docblock"><p>Converts this slice to its ASCII lower case equivalent in-place.</p>
|
||
<p>ASCII letters ‘A’ to ‘Z’ are mapped to ‘a’ to ‘z’,
|
||
but non-ASCII letters are unchanged.</p>
|
||
<p>To return a new lowercased value without modifying the existing one, use
|
||
<a href="#method.to_ascii_lowercase"><code>to_ascii_lowercase</code></a>.</p>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.escape_ascii" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.60.0">1.60.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.67.0/src/core/slice/ascii.rs.html#78">source</a></span><h4 class="code-header">pub fn <a href="#method.escape_ascii" class="fn">escape_ascii</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.67.0/core/slice/ascii/struct.EscapeAscii.html" title="struct core::slice::ascii::EscapeAscii">EscapeAscii</a><'_></h4></section></summary><div class="docblock"><p>Returns an iterator that produces an escaped version of this slice,
|
||
treating it as an ASCII string.</p>
|
||
<h5 id="examples-1"><a href="#examples-1">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code>
|
||
<span class="kw">let </span>s = <span class="string">b"0\t\r\n'\"\\\x9d"</span>;
|
||
<span class="kw">let </span>escaped = s.escape_ascii().to_string();
|
||
<span class="macro">assert_eq!</span>(escaped, <span class="string">"0\\t\\r\\n\\'\\\"\\\\\\x9d"</span>);</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.trim_ascii_start" class="method has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.67.0/src/core/slice/ascii.rs.html#97">source</a><h4 class="code-header">pub fn <a href="#method.trim_ascii_start" class="fn">trim_ascii_start</a>(&self) -> &[<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.u8.html">u8</a>]</h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>byte_slice_trim_ascii</code>)</span></div></span></summary><div class="docblock"><p>Returns a byte slice with leading ASCII whitespace bytes removed.</p>
|
||
<p>‘Whitespace’ refers to the definition used by
|
||
<code>u8::is_ascii_whitespace</code>.</p>
|
||
<h5 id="examples-2"><a href="#examples-2">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(byte_slice_trim_ascii)]
|
||
|
||
</span><span class="macro">assert_eq!</span>(<span class="string">b" \t hello world\n"</span>.trim_ascii_start(), <span class="string">b"hello world\n"</span>);
|
||
<span class="macro">assert_eq!</span>(<span class="string">b" "</span>.trim_ascii_start(), <span class="string">b""</span>);
|
||
<span class="macro">assert_eq!</span>(<span class="string">b""</span>.trim_ascii_start(), <span class="string">b""</span>);</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.trim_ascii_end" class="method has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.67.0/src/core/slice/ascii.rs.html#126">source</a><h4 class="code-header">pub fn <a href="#method.trim_ascii_end" class="fn">trim_ascii_end</a>(&self) -> &[<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.u8.html">u8</a>]</h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>byte_slice_trim_ascii</code>)</span></div></span></summary><div class="docblock"><p>Returns a byte slice with trailing ASCII whitespace bytes removed.</p>
|
||
<p>‘Whitespace’ refers to the definition used by
|
||
<code>u8::is_ascii_whitespace</code>.</p>
|
||
<h5 id="examples-3"><a href="#examples-3">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(byte_slice_trim_ascii)]
|
||
|
||
</span><span class="macro">assert_eq!</span>(<span class="string">b"\r hello world\n "</span>.trim_ascii_end(), <span class="string">b"\r hello world"</span>);
|
||
<span class="macro">assert_eq!</span>(<span class="string">b" "</span>.trim_ascii_end(), <span class="string">b""</span>);
|
||
<span class="macro">assert_eq!</span>(<span class="string">b""</span>.trim_ascii_end(), <span class="string">b""</span>);</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.trim_ascii" class="method has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.67.0/src/core/slice/ascii.rs.html#156">source</a><h4 class="code-header">pub fn <a href="#method.trim_ascii" class="fn">trim_ascii</a>(&self) -> &[<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.u8.html">u8</a>]</h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>byte_slice_trim_ascii</code>)</span></div></span></summary><div class="docblock"><p>Returns a byte slice with leading and trailing ASCII whitespace bytes
|
||
removed.</p>
|
||
<p>‘Whitespace’ refers to the definition used by
|
||
<code>u8::is_ascii_whitespace</code>.</p>
|
||
<h5 id="examples-4"><a href="#examples-4">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(byte_slice_trim_ascii)]
|
||
|
||
</span><span class="macro">assert_eq!</span>(<span class="string">b"\r hello world\n "</span>.trim_ascii(), <span class="string">b"hello world"</span>);
|
||
<span class="macro">assert_eq!</span>(<span class="string">b" "</span>.trim_ascii(), <span class="string">b""</span>);
|
||
<span class="macro">assert_eq!</span>(<span class="string">b""</span>.trim_ascii(), <span class="string">b""</span>);</code></pre></div>
|
||
</div></details></div><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.len" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.67.0/src/core/slice/mod.rs.html#130">source</a></span><h4 class="code-header">pub fn <a href="#method.len" class="fn">len</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.usize.html">usize</a></h4></section></summary><div class="docblock"><p>Returns the number of elements in the slice.</p>
|
||
<h5 id="examples-5"><a href="#examples-5">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>a = [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>];
|
||
<span class="macro">assert_eq!</span>(a.len(), <span class="number">3</span>);</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.is_empty" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.67.0/src/core/slice/mod.rs.html#146">source</a></span><h4 class="code-header">pub fn <a href="#method.is_empty" class="fn">is_empty</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Returns <code>true</code> if the slice has a length of 0.</p>
|
||
<h5 id="examples-6"><a href="#examples-6">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>a = [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>];
|
||
<span class="macro">assert!</span>(!a.is_empty());</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.first" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.67.0/src/core/slice/mod.rs.html#165">source</a></span><h4 class="code-header">pub fn <a href="#method.first" class="fn">first</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/1.67.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.reference.html">&</a>T></h4></section></summary><div class="docblock"><p>Returns the first element of the slice, or <code>None</code> if it is empty.</p>
|
||
<h5 id="examples-7"><a href="#examples-7">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>v = [<span class="number">10</span>, <span class="number">40</span>, <span class="number">30</span>];
|
||
<span class="macro">assert_eq!</span>(<span class="prelude-val">Some</span>(<span class="kw-2">&</span><span class="number">10</span>), v.first());
|
||
|
||
<span class="kw">let </span>w: <span class="kw-2">&</span>[i32] = <span class="kw-2">&</span>[];
|
||
<span class="macro">assert_eq!</span>(<span class="prelude-val">None</span>, w.first());</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.first_mut" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.67.0/src/core/slice/mod.rs.html#185">source</a></span><h4 class="code-header">pub fn <a href="#method.first_mut" class="fn">first_mut</a>(&mut self) -> <a class="enum" href="https://doc.rust-lang.org/1.67.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.reference.html">&mut </a>T></h4></section></summary><div class="docblock"><p>Returns a mutable pointer to the first element of the slice, or <code>None</code> if it is empty.</p>
|
||
<h5 id="examples-8"><a href="#examples-8">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>x = <span class="kw-2">&mut </span>[<span class="number">0</span>, <span class="number">1</span>, <span class="number">2</span>];
|
||
|
||
<span class="kw">if let </span><span class="prelude-val">Some</span>(first) = x.first_mut() {
|
||
<span class="kw-2">*</span>first = <span class="number">5</span>;
|
||
}
|
||
<span class="macro">assert_eq!</span>(x, <span class="kw-2">&</span>[<span class="number">5</span>, <span class="number">1</span>, <span class="number">2</span>]);</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.split_first" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.5.0">1.5.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.67.0/src/core/slice/mod.rs.html#205">source</a></span><h4 class="code-header">pub fn <a href="#method.split_first" class="fn">split_first</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/1.67.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><(<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.reference.html">&</a>T, &<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html">[T]</a>)></h4></section></summary><div class="docblock"><p>Returns the first and all the rest of the elements of the slice, or <code>None</code> if it is empty.</p>
|
||
<h5 id="examples-9"><a href="#examples-9">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>x = <span class="kw-2">&</span>[<span class="number">0</span>, <span class="number">1</span>, <span class="number">2</span>];
|
||
|
||
<span class="kw">if let </span><span class="prelude-val">Some</span>((first, elements)) = x.split_first() {
|
||
<span class="macro">assert_eq!</span>(first, <span class="kw-2">&</span><span class="number">0</span>);
|
||
<span class="macro">assert_eq!</span>(elements, <span class="kw-2">&</span>[<span class="number">1</span>, <span class="number">2</span>]);
|
||
}</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.split_first_mut" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.5.0">1.5.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.67.0/src/core/slice/mod.rs.html#227">source</a></span><h4 class="code-header">pub fn <a href="#method.split_first_mut" class="fn">split_first_mut</a>(&mut self) -> <a class="enum" href="https://doc.rust-lang.org/1.67.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><(<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.reference.html">&mut </a>T, &mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html">[T]</a>)></h4></section></summary><div class="docblock"><p>Returns the first and all the rest of the elements of the slice, or <code>None</code> if it is empty.</p>
|
||
<h5 id="examples-10"><a href="#examples-10">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>x = <span class="kw-2">&mut </span>[<span class="number">0</span>, <span class="number">1</span>, <span class="number">2</span>];
|
||
|
||
<span class="kw">if let </span><span class="prelude-val">Some</span>((first, elements)) = x.split_first_mut() {
|
||
<span class="kw-2">*</span>first = <span class="number">3</span>;
|
||
elements[<span class="number">0</span>] = <span class="number">4</span>;
|
||
elements[<span class="number">1</span>] = <span class="number">5</span>;
|
||
}
|
||
<span class="macro">assert_eq!</span>(x, <span class="kw-2">&</span>[<span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>]);</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.split_last" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.5.0">1.5.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.67.0/src/core/slice/mod.rs.html#247">source</a></span><h4 class="code-header">pub fn <a href="#method.split_last" class="fn">split_last</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/1.67.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><(<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.reference.html">&</a>T, &<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html">[T]</a>)></h4></section></summary><div class="docblock"><p>Returns the last and all the rest of the elements of the slice, or <code>None</code> if it is empty.</p>
|
||
<h5 id="examples-11"><a href="#examples-11">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>x = <span class="kw-2">&</span>[<span class="number">0</span>, <span class="number">1</span>, <span class="number">2</span>];
|
||
|
||
<span class="kw">if let </span><span class="prelude-val">Some</span>((last, elements)) = x.split_last() {
|
||
<span class="macro">assert_eq!</span>(last, <span class="kw-2">&</span><span class="number">2</span>);
|
||
<span class="macro">assert_eq!</span>(elements, <span class="kw-2">&</span>[<span class="number">0</span>, <span class="number">1</span>]);
|
||
}</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.split_last_mut" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.5.0">1.5.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.67.0/src/core/slice/mod.rs.html#269">source</a></span><h4 class="code-header">pub fn <a href="#method.split_last_mut" class="fn">split_last_mut</a>(&mut self) -> <a class="enum" href="https://doc.rust-lang.org/1.67.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><(<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.reference.html">&mut </a>T, &mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html">[T]</a>)></h4></section></summary><div class="docblock"><p>Returns the last and all the rest of the elements of the slice, or <code>None</code> if it is empty.</p>
|
||
<h5 id="examples-12"><a href="#examples-12">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>x = <span class="kw-2">&mut </span>[<span class="number">0</span>, <span class="number">1</span>, <span class="number">2</span>];
|
||
|
||
<span class="kw">if let </span><span class="prelude-val">Some</span>((last, elements)) = x.split_last_mut() {
|
||
<span class="kw-2">*</span>last = <span class="number">3</span>;
|
||
elements[<span class="number">0</span>] = <span class="number">4</span>;
|
||
elements[<span class="number">1</span>] = <span class="number">5</span>;
|
||
}
|
||
<span class="macro">assert_eq!</span>(x, <span class="kw-2">&</span>[<span class="number">4</span>, <span class="number">5</span>, <span class="number">3</span>]);</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.last" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.67.0/src/core/slice/mod.rs.html#288">source</a></span><h4 class="code-header">pub fn <a href="#method.last" class="fn">last</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/1.67.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.reference.html">&</a>T></h4></section></summary><div class="docblock"><p>Returns the last element of the slice, or <code>None</code> if it is empty.</p>
|
||
<h5 id="examples-13"><a href="#examples-13">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>v = [<span class="number">10</span>, <span class="number">40</span>, <span class="number">30</span>];
|
||
<span class="macro">assert_eq!</span>(<span class="prelude-val">Some</span>(<span class="kw-2">&</span><span class="number">30</span>), v.last());
|
||
|
||
<span class="kw">let </span>w: <span class="kw-2">&</span>[i32] = <span class="kw-2">&</span>[];
|
||
<span class="macro">assert_eq!</span>(<span class="prelude-val">None</span>, w.last());</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.last_mut" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.67.0/src/core/slice/mod.rs.html#308">source</a></span><h4 class="code-header">pub fn <a href="#method.last_mut" class="fn">last_mut</a>(&mut self) -> <a class="enum" href="https://doc.rust-lang.org/1.67.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.reference.html">&mut </a>T></h4></section></summary><div class="docblock"><p>Returns a mutable pointer to the last item in the slice.</p>
|
||
<h5 id="examples-14"><a href="#examples-14">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>x = <span class="kw-2">&mut </span>[<span class="number">0</span>, <span class="number">1</span>, <span class="number">2</span>];
|
||
|
||
<span class="kw">if let </span><span class="prelude-val">Some</span>(last) = x.last_mut() {
|
||
<span class="kw-2">*</span>last = <span class="number">10</span>;
|
||
}
|
||
<span class="macro">assert_eq!</span>(x, <span class="kw-2">&</span>[<span class="number">0</span>, <span class="number">1</span>, <span class="number">10</span>]);</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.67.0/src/core/slice/mod.rs.html#333-335">source</a></span><h4 class="code-header">pub fn <a href="#method.get" class="fn">get</a><I>(&self, index: I) -> <a class="enum" href="https://doc.rust-lang.org/1.67.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&<I as <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/slice/index/trait.SliceIndex.html" title="trait core::slice::index::SliceIndex">SliceIndex</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html">[T]</a>>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.67.0/core/slice/index/trait.SliceIndex.html#associatedtype.Output" title="type core::slice::index::SliceIndex::Output">Output</a>><span class="where fmt-newline">where<br> I: <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/slice/index/trait.SliceIndex.html" title="trait core::slice::index::SliceIndex">SliceIndex</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html">[T]</a>>,</span></h4></section></summary><div class="docblock"><p>Returns a reference to an element or subslice depending on the type of
|
||
index.</p>
|
||
<ul>
|
||
<li>If given a position, returns a reference to the element at that
|
||
position or <code>None</code> if out of bounds.</li>
|
||
<li>If given a range, returns the subslice corresponding to that range,
|
||
or <code>None</code> if out of bounds.</li>
|
||
</ul>
|
||
<h5 id="examples-15"><a href="#examples-15">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>v = [<span class="number">10</span>, <span class="number">40</span>, <span class="number">30</span>];
|
||
<span class="macro">assert_eq!</span>(<span class="prelude-val">Some</span>(<span class="kw-2">&</span><span class="number">40</span>), v.get(<span class="number">1</span>));
|
||
<span class="macro">assert_eq!</span>(<span class="prelude-val">Some</span>(<span class="kw-2">&</span>[<span class="number">10</span>, <span class="number">40</span>][..]), v.get(<span class="number">0</span>..<span class="number">2</span>));
|
||
<span class="macro">assert_eq!</span>(<span class="prelude-val">None</span>, v.get(<span class="number">3</span>));
|
||
<span class="macro">assert_eq!</span>(<span class="prelude-val">None</span>, v.get(<span class="number">0</span>..<span class="number">4</span>));</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_mut" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.67.0/src/core/slice/mod.rs.html#359-361">source</a></span><h4 class="code-header">pub fn <a href="#method.get_mut" class="fn">get_mut</a><I>(<br> &mut self,<br> index: I<br>) -> <a class="enum" href="https://doc.rust-lang.org/1.67.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&mut <I as <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/slice/index/trait.SliceIndex.html" title="trait core::slice::index::SliceIndex">SliceIndex</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html">[T]</a>>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.67.0/core/slice/index/trait.SliceIndex.html#associatedtype.Output" title="type core::slice::index::SliceIndex::Output">Output</a>><span class="where fmt-newline">where<br> I: <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/slice/index/trait.SliceIndex.html" title="trait core::slice::index::SliceIndex">SliceIndex</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html">[T]</a>>,</span></h4></section></summary><div class="docblock"><p>Returns a mutable reference to an element or subslice depending on the
|
||
type of index (see <a href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html#method.get"><code>get</code></a>) or <code>None</code> if the index is out of bounds.</p>
|
||
<h5 id="examples-16"><a href="#examples-16">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>x = <span class="kw-2">&mut </span>[<span class="number">0</span>, <span class="number">1</span>, <span class="number">2</span>];
|
||
|
||
<span class="kw">if let </span><span class="prelude-val">Some</span>(elem) = x.get_mut(<span class="number">1</span>) {
|
||
<span class="kw-2">*</span>elem = <span class="number">42</span>;
|
||
}
|
||
<span class="macro">assert_eq!</span>(x, <span class="kw-2">&</span>[<span class="number">0</span>, <span class="number">42</span>, <span class="number">2</span>]);</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_unchecked" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.67.0/src/core/slice/mod.rs.html#392-394">source</a></span><h4 class="code-header">pub unsafe fn <a href="#method.get_unchecked" class="fn">get_unchecked</a><I>(<br> &self,<br> index: I<br>) -> &<I as <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/slice/index/trait.SliceIndex.html" title="trait core::slice::index::SliceIndex">SliceIndex</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html">[T]</a>>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.67.0/core/slice/index/trait.SliceIndex.html#associatedtype.Output" title="type core::slice::index::SliceIndex::Output">Output</a><span class="where fmt-newline">where<br> I: <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/slice/index/trait.SliceIndex.html" title="trait core::slice::index::SliceIndex">SliceIndex</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html">[T]</a>>,</span></h4></section></summary><div class="docblock"><p>Returns a reference to an element or subslice, without doing bounds
|
||
checking.</p>
|
||
<p>For a safe alternative see <a href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html#method.get"><code>get</code></a>.</p>
|
||
<h5 id="safety"><a href="#safety">Safety</a></h5>
|
||
<p>Calling this method with an out-of-bounds index is <em><a href="https://doc.rust-lang.org/reference/behavior-considered-undefined.html">undefined behavior</a></em>
|
||
even if the resulting reference is not used.</p>
|
||
<h5 id="examples-17"><a href="#examples-17">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>x = <span class="kw-2">&</span>[<span class="number">1</span>, <span class="number">2</span>, <span class="number">4</span>];
|
||
|
||
<span class="kw">unsafe </span>{
|
||
<span class="macro">assert_eq!</span>(x.get_unchecked(<span class="number">1</span>), <span class="kw-2">&</span><span class="number">2</span>);
|
||
}</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_unchecked_mut" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.67.0/src/core/slice/mod.rs.html#430-432">source</a></span><h4 class="code-header">pub unsafe fn <a href="#method.get_unchecked_mut" class="fn">get_unchecked_mut</a><I>(<br> &mut self,<br> index: I<br>) -> &mut <I as <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/slice/index/trait.SliceIndex.html" title="trait core::slice::index::SliceIndex">SliceIndex</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html">[T]</a>>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.67.0/core/slice/index/trait.SliceIndex.html#associatedtype.Output" title="type core::slice::index::SliceIndex::Output">Output</a><span class="where fmt-newline">where<br> I: <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/slice/index/trait.SliceIndex.html" title="trait core::slice::index::SliceIndex">SliceIndex</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html">[T]</a>>,</span></h4></section></summary><div class="docblock"><p>Returns a mutable reference to an element or subslice, without doing
|
||
bounds checking.</p>
|
||
<p>For a safe alternative see <a href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html#method.get_mut"><code>get_mut</code></a>.</p>
|
||
<h5 id="safety-1"><a href="#safety-1">Safety</a></h5>
|
||
<p>Calling this method with an out-of-bounds index is <em><a href="https://doc.rust-lang.org/reference/behavior-considered-undefined.html">undefined behavior</a></em>
|
||
even if the resulting reference is not used.</p>
|
||
<h5 id="examples-18"><a href="#examples-18">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>x = <span class="kw-2">&mut </span>[<span class="number">1</span>, <span class="number">2</span>, <span class="number">4</span>];
|
||
|
||
<span class="kw">unsafe </span>{
|
||
<span class="kw">let </span>elem = x.get_unchecked_mut(<span class="number">1</span>);
|
||
<span class="kw-2">*</span>elem = <span class="number">13</span>;
|
||
}
|
||
<span class="macro">assert_eq!</span>(x, <span class="kw-2">&</span>[<span class="number">1</span>, <span class="number">13</span>, <span class="number">4</span>]);</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_ptr" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.67.0/src/core/slice/mod.rs.html#470">source</a></span><h4 class="code-header">pub fn <a href="#method.as_ptr" class="fn">as_ptr</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.pointer.html">*const T</a></h4></section></summary><div class="docblock"><p>Returns a raw pointer to the slice’s buffer.</p>
|
||
<p>The caller must ensure that the slice outlives the pointer this
|
||
function returns, or else it will end up pointing to garbage.</p>
|
||
<p>The caller must also ensure that the memory the pointer (non-transitively) points to
|
||
is never written to (except inside an <code>UnsafeCell</code>) using this pointer or any pointer
|
||
derived from it. If you need to mutate the contents of the slice, use <a href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html#method.as_mut_ptr"><code>as_mut_ptr</code></a>.</p>
|
||
<p>Modifying the container referenced by this slice may cause its buffer
|
||
to be reallocated, which would also make any pointers to it invalid.</p>
|
||
<h5 id="examples-19"><a href="#examples-19">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>x = <span class="kw-2">&</span>[<span class="number">1</span>, <span class="number">2</span>, <span class="number">4</span>];
|
||
<span class="kw">let </span>x_ptr = x.as_ptr();
|
||
|
||
<span class="kw">unsafe </span>{
|
||
<span class="kw">for </span>i <span class="kw">in </span><span class="number">0</span>..x.len() {
|
||
<span class="macro">assert_eq!</span>(x.get_unchecked(i), <span class="kw-2">&*</span>x_ptr.add(i));
|
||
}
|
||
}</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_mut_ptr" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.67.0/src/core/slice/mod.rs.html#500">source</a></span><h4 class="code-header">pub fn <a href="#method.as_mut_ptr" class="fn">as_mut_ptr</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.pointer.html">*mut T</a></h4></section></summary><div class="docblock"><p>Returns an unsafe mutable pointer to the slice’s buffer.</p>
|
||
<p>The caller must ensure that the slice outlives the pointer this
|
||
function returns, or else it will end up pointing to garbage.</p>
|
||
<p>Modifying the container referenced by this slice may cause its buffer
|
||
to be reallocated, which would also make any pointers to it invalid.</p>
|
||
<h5 id="examples-20"><a href="#examples-20">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>x = <span class="kw-2">&mut </span>[<span class="number">1</span>, <span class="number">2</span>, <span class="number">4</span>];
|
||
<span class="kw">let </span>x_ptr = x.as_mut_ptr();
|
||
|
||
<span class="kw">unsafe </span>{
|
||
<span class="kw">for </span>i <span class="kw">in </span><span class="number">0</span>..x.len() {
|
||
<span class="kw-2">*</span>x_ptr.add(i) += <span class="number">2</span>;
|
||
}
|
||
}
|
||
<span class="macro">assert_eq!</span>(x, <span class="kw-2">&</span>[<span class="number">3</span>, <span class="number">4</span>, <span class="number">6</span>]);</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_ptr_range" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.48.0">1.48.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.67.0/src/core/slice/mod.rs.html#536">source</a></span><h4 class="code-header">pub fn <a href="#method.as_ptr_range" class="fn">as_ptr_range</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.67.0/core/ops/range/struct.Range.html" title="struct core::ops::range::Range">Range</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.pointer.html">*const T</a>></h4></section></summary><div class="docblock"><p>Returns the two raw pointers spanning the slice.</p>
|
||
<p>The returned range is half-open, which means that the end pointer
|
||
points <em>one past</em> the last element of the slice. This way, an empty
|
||
slice is represented by two equal pointers, and the difference between
|
||
the two pointers represents the size of the slice.</p>
|
||
<p>See <a href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html#method.as_ptr"><code>as_ptr</code></a> for warnings on using these pointers. The end pointer
|
||
requires extra caution, as it does not point to a valid element in the
|
||
slice.</p>
|
||
<p>This function is useful for interacting with foreign interfaces which
|
||
use two pointers to refer to a range of elements in memory, as is
|
||
common in C++.</p>
|
||
<p>It can also be useful to check if a pointer to an element refers to an
|
||
element of this slice:</p>
|
||
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>a = [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>];
|
||
<span class="kw">let </span>x = <span class="kw-2">&</span>a[<span class="number">1</span>] <span class="kw">as </span><span class="kw-2">*const </span><span class="kw">_</span>;
|
||
<span class="kw">let </span>y = <span class="kw-2">&</span><span class="number">5 </span><span class="kw">as </span><span class="kw-2">*const </span><span class="kw">_</span>;
|
||
|
||
<span class="macro">assert!</span>(a.as_ptr_range().contains(<span class="kw-2">&</span>x));
|
||
<span class="macro">assert!</span>(!a.as_ptr_range().contains(<span class="kw-2">&</span>y));</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_mut_ptr_range" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.48.0">1.48.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.67.0/src/core/slice/mod.rs.html#580">source</a></span><h4 class="code-header">pub fn <a href="#method.as_mut_ptr_range" class="fn">as_mut_ptr_range</a>(&mut self) -> <a class="struct" href="https://doc.rust-lang.org/1.67.0/core/ops/range/struct.Range.html" title="struct core::ops::range::Range">Range</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.pointer.html">*mut T</a>></h4></section></summary><div class="docblock"><p>Returns the two unsafe mutable pointers spanning the slice.</p>
|
||
<p>The returned range is half-open, which means that the end pointer
|
||
points <em>one past</em> the last element of the slice. This way, an empty
|
||
slice is represented by two equal pointers, and the difference between
|
||
the two pointers represents the size of the slice.</p>
|
||
<p>See <a href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html#method.as_mut_ptr"><code>as_mut_ptr</code></a> for warnings on using these pointers. The end
|
||
pointer requires extra caution, as it does not point to a valid element
|
||
in the slice.</p>
|
||
<p>This function is useful for interacting with foreign interfaces which
|
||
use two pointers to refer to a range of elements in memory, as is
|
||
common in C++.</p>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.swap" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.67.0/src/core/slice/mod.rs.html#609">source</a></span><h4 class="code-header">pub fn <a href="#method.swap" class="fn">swap</a>(&mut self, a: <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.usize.html">usize</a>, b: <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.usize.html">usize</a>)</h4></section></summary><div class="docblock"><p>Swaps two elements in the slice.</p>
|
||
<h5 id="arguments"><a href="#arguments">Arguments</a></h5>
|
||
<ul>
|
||
<li>a - The index of the first element</li>
|
||
<li>b - The index of the second element</li>
|
||
</ul>
|
||
<h5 id="panics"><a href="#panics">Panics</a></h5>
|
||
<p>Panics if <code>a</code> or <code>b</code> are out of bounds.</p>
|
||
<h5 id="examples-21"><a href="#examples-21">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>v = [<span class="string">"a"</span>, <span class="string">"b"</span>, <span class="string">"c"</span>, <span class="string">"d"</span>, <span class="string">"e"</span>];
|
||
v.swap(<span class="number">2</span>, <span class="number">4</span>);
|
||
<span class="macro">assert!</span>(v == [<span class="string">"a"</span>, <span class="string">"b"</span>, <span class="string">"e"</span>, <span class="string">"d"</span>, <span class="string">"c"</span>]);</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.swap_unchecked" class="method has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.67.0/src/core/slice/mod.rs.html#652">source</a><h4 class="code-header">pub unsafe fn <a href="#method.swap_unchecked" class="fn">swap_unchecked</a>(&mut self, a: <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.usize.html">usize</a>, b: <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.usize.html">usize</a>)</h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_swap_unchecked</code>)</span></div></span></summary><div class="docblock"><p>Swaps two elements in the slice, without doing bounds checking.</p>
|
||
<p>For a safe alternative see <a href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html#method.swap"><code>swap</code></a>.</p>
|
||
<h5 id="arguments-1"><a href="#arguments-1">Arguments</a></h5>
|
||
<ul>
|
||
<li>a - The index of the first element</li>
|
||
<li>b - The index of the second element</li>
|
||
</ul>
|
||
<h5 id="safety-2"><a href="#safety-2">Safety</a></h5>
|
||
<p>Calling this method with an out-of-bounds index is <em><a href="https://doc.rust-lang.org/reference/behavior-considered-undefined.html">undefined behavior</a></em>.
|
||
The caller has to ensure that <code>a < self.len()</code> and <code>b < self.len()</code>.</p>
|
||
<h5 id="examples-22"><a href="#examples-22">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_swap_unchecked)]
|
||
|
||
</span><span class="kw">let </span><span class="kw-2">mut </span>v = [<span class="string">"a"</span>, <span class="string">"b"</span>, <span class="string">"c"</span>, <span class="string">"d"</span>];
|
||
<span class="comment">// SAFETY: we know that 1 and 3 are both indices of the slice
|
||
</span><span class="kw">unsafe </span>{ v.swap_unchecked(<span class="number">1</span>, <span class="number">3</span>) };
|
||
<span class="macro">assert!</span>(v == [<span class="string">"a"</span>, <span class="string">"d"</span>, <span class="string">"c"</span>, <span class="string">"b"</span>]);</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.reverse" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.67.0/src/core/slice/mod.rs.html#677">source</a></span><h4 class="code-header">pub fn <a href="#method.reverse" class="fn">reverse</a>(&mut self)</h4></section></summary><div class="docblock"><p>Reverses the order of elements in the slice, in place.</p>
|
||
<h5 id="examples-23"><a href="#examples-23">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>v = [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>];
|
||
v.reverse();
|
||
<span class="macro">assert!</span>(v == [<span class="number">3</span>, <span class="number">2</span>, <span class="number">1</span>]);</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.iter" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.67.0/src/core/slice/mod.rs.html#735">source</a></span><h4 class="code-header">pub fn <a href="#method.iter" class="fn">iter</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.67.0/core/slice/iter/struct.Iter.html" title="struct core::slice::iter::Iter">Iter</a><'_, T></h4></section></summary><div class="docblock"><p>Returns an iterator over the slice.</p>
|
||
<p>The iterator yields all items from start to end.</p>
|
||
<h5 id="examples-24"><a href="#examples-24">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>x = <span class="kw-2">&</span>[<span class="number">1</span>, <span class="number">2</span>, <span class="number">4</span>];
|
||
<span class="kw">let </span><span class="kw-2">mut </span>iterator = x.iter();
|
||
|
||
<span class="macro">assert_eq!</span>(iterator.next(), <span class="prelude-val">Some</span>(<span class="kw-2">&</span><span class="number">1</span>));
|
||
<span class="macro">assert_eq!</span>(iterator.next(), <span class="prelude-val">Some</span>(<span class="kw-2">&</span><span class="number">2</span>));
|
||
<span class="macro">assert_eq!</span>(iterator.next(), <span class="prelude-val">Some</span>(<span class="kw-2">&</span><span class="number">4</span>));
|
||
<span class="macro">assert_eq!</span>(iterator.next(), <span class="prelude-val">None</span>);</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.iter_mut" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.67.0/src/core/slice/mod.rs.html#754">source</a></span><h4 class="code-header">pub fn <a href="#method.iter_mut" class="fn">iter_mut</a>(&mut self) -> <a class="struct" href="https://doc.rust-lang.org/1.67.0/core/slice/iter/struct.IterMut.html" title="struct core::slice::iter::IterMut">IterMut</a><'_, T></h4></section></summary><div class="docblock"><p>Returns an iterator that allows modifying each value.</p>
|
||
<p>The iterator yields all items from start to end.</p>
|
||
<h5 id="examples-25"><a href="#examples-25">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>x = <span class="kw-2">&mut </span>[<span class="number">1</span>, <span class="number">2</span>, <span class="number">4</span>];
|
||
<span class="kw">for </span>elem <span class="kw">in </span>x.iter_mut() {
|
||
<span class="kw-2">*</span>elem += <span class="number">2</span>;
|
||
}
|
||
<span class="macro">assert_eq!</span>(x, <span class="kw-2">&</span>[<span class="number">3</span>, <span class="number">4</span>, <span class="number">6</span>]);</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.windows" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.67.0/src/core/slice/mod.rs.html#786">source</a></span><h4 class="code-header">pub fn <a href="#method.windows" class="fn">windows</a>(&self, size: <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.usize.html">usize</a>) -> <a class="struct" href="https://doc.rust-lang.org/1.67.0/core/slice/iter/struct.Windows.html" title="struct core::slice::iter::Windows">Windows</a><'_, T></h4></section></summary><div class="docblock"><p>Returns an iterator over all contiguous windows of length
|
||
<code>size</code>. The windows overlap. If the slice is shorter than
|
||
<code>size</code>, the iterator returns no values.</p>
|
||
<h5 id="panics-1"><a href="#panics-1">Panics</a></h5>
|
||
<p>Panics if <code>size</code> is 0.</p>
|
||
<h5 id="examples-26"><a href="#examples-26">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>slice = [<span class="string">'r'</span>, <span class="string">'u'</span>, <span class="string">'s'</span>, <span class="string">'t'</span>];
|
||
<span class="kw">let </span><span class="kw-2">mut </span>iter = slice.windows(<span class="number">2</span>);
|
||
<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&</span>[<span class="string">'r'</span>, <span class="string">'u'</span>]);
|
||
<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&</span>[<span class="string">'u'</span>, <span class="string">'s'</span>]);
|
||
<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&</span>[<span class="string">'s'</span>, <span class="string">'t'</span>]);
|
||
<span class="macro">assert!</span>(iter.next().is_none());</code></pre></div>
|
||
<p>If the slice is shorter than <code>size</code>:</p>
|
||
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>slice = [<span class="string">'f'</span>, <span class="string">'o'</span>, <span class="string">'o'</span>];
|
||
<span class="kw">let </span><span class="kw-2">mut </span>iter = slice.windows(<span class="number">4</span>);
|
||
<span class="macro">assert!</span>(iter.next().is_none());</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.chunks" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.67.0/src/core/slice/mod.rs.html#820">source</a></span><h4 class="code-header">pub fn <a href="#method.chunks" class="fn">chunks</a>(&self, chunk_size: <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.usize.html">usize</a>) -> <a class="struct" href="https://doc.rust-lang.org/1.67.0/core/slice/iter/struct.Chunks.html" title="struct core::slice::iter::Chunks">Chunks</a><'_, T></h4></section></summary><div class="docblock"><p>Returns an iterator over <code>chunk_size</code> elements of the slice at a time, starting at the
|
||
beginning of the slice.</p>
|
||
<p>The chunks are slices and do not overlap. If <code>chunk_size</code> does not divide the length of the
|
||
slice, then the last chunk will not have length <code>chunk_size</code>.</p>
|
||
<p>See <a href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html#method.chunks_exact"><code>chunks_exact</code></a> for a variant of this iterator that returns chunks of always exactly
|
||
<code>chunk_size</code> elements, and <a href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html#method.rchunks"><code>rchunks</code></a> for the same iterator but starting at the end of the
|
||
slice.</p>
|
||
<h5 id="panics-2"><a href="#panics-2">Panics</a></h5>
|
||
<p>Panics if <code>chunk_size</code> is 0.</p>
|
||
<h5 id="examples-27"><a href="#examples-27">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>slice = [<span class="string">'l'</span>, <span class="string">'o'</span>, <span class="string">'r'</span>, <span class="string">'e'</span>, <span class="string">'m'</span>];
|
||
<span class="kw">let </span><span class="kw-2">mut </span>iter = slice.chunks(<span class="number">2</span>);
|
||
<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&</span>[<span class="string">'l'</span>, <span class="string">'o'</span>]);
|
||
<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&</span>[<span class="string">'r'</span>, <span class="string">'e'</span>]);
|
||
<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&</span>[<span class="string">'m'</span>]);
|
||
<span class="macro">assert!</span>(iter.next().is_none());</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.chunks_mut" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.67.0/src/core/slice/mod.rs.html#858">source</a></span><h4 class="code-header">pub fn <a href="#method.chunks_mut" class="fn">chunks_mut</a>(&mut self, chunk_size: <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.usize.html">usize</a>) -> <a class="struct" href="https://doc.rust-lang.org/1.67.0/core/slice/iter/struct.ChunksMut.html" title="struct core::slice::iter::ChunksMut">ChunksMut</a><'_, T></h4></section></summary><div class="docblock"><p>Returns an iterator over <code>chunk_size</code> elements of the slice at a time, starting at the
|
||
beginning of the slice.</p>
|
||
<p>The chunks are mutable slices, and do not overlap. If <code>chunk_size</code> does not divide the
|
||
length of the slice, then the last chunk will not have length <code>chunk_size</code>.</p>
|
||
<p>See <a href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html#method.chunks_exact_mut"><code>chunks_exact_mut</code></a> for a variant of this iterator that returns chunks of always
|
||
exactly <code>chunk_size</code> elements, and <a href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html#method.rchunks_mut"><code>rchunks_mut</code></a> for the same iterator but starting at
|
||
the end of the slice.</p>
|
||
<h5 id="panics-3"><a href="#panics-3">Panics</a></h5>
|
||
<p>Panics if <code>chunk_size</code> is 0.</p>
|
||
<h5 id="examples-28"><a href="#examples-28">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>v = <span class="kw-2">&mut </span>[<span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>];
|
||
<span class="kw">let </span><span class="kw-2">mut </span>count = <span class="number">1</span>;
|
||
|
||
<span class="kw">for </span>chunk <span class="kw">in </span>v.chunks_mut(<span class="number">2</span>) {
|
||
<span class="kw">for </span>elem <span class="kw">in </span>chunk.iter_mut() {
|
||
<span class="kw-2">*</span>elem += count;
|
||
}
|
||
count += <span class="number">1</span>;
|
||
}
|
||
<span class="macro">assert_eq!</span>(v, <span class="kw-2">&</span>[<span class="number">1</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">2</span>, <span class="number">3</span>]);</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.chunks_exact" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.31.0">1.31.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.67.0/src/core/slice/mod.rs.html#895">source</a></span><h4 class="code-header">pub fn <a href="#method.chunks_exact" class="fn">chunks_exact</a>(&self, chunk_size: <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.usize.html">usize</a>) -> <a class="struct" href="https://doc.rust-lang.org/1.67.0/core/slice/iter/struct.ChunksExact.html" title="struct core::slice::iter::ChunksExact">ChunksExact</a><'_, T></h4></section></summary><div class="docblock"><p>Returns an iterator over <code>chunk_size</code> elements of the slice at a time, starting at the
|
||
beginning of the slice.</p>
|
||
<p>The chunks are slices and do not overlap. If <code>chunk_size</code> does not divide the length of the
|
||
slice, then the last up to <code>chunk_size-1</code> elements will be omitted and can be retrieved
|
||
from the <code>remainder</code> function of the iterator.</p>
|
||
<p>Due to each chunk having exactly <code>chunk_size</code> elements, the compiler can often optimize the
|
||
resulting code better than in the case of <a href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html#method.chunks"><code>chunks</code></a>.</p>
|
||
<p>See <a href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html#method.chunks"><code>chunks</code></a> for a variant of this iterator that also returns the remainder as a smaller
|
||
chunk, and <a href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html#method.rchunks_exact"><code>rchunks_exact</code></a> for the same iterator but starting at the end of the slice.</p>
|
||
<h5 id="panics-4"><a href="#panics-4">Panics</a></h5>
|
||
<p>Panics if <code>chunk_size</code> is 0.</p>
|
||
<h5 id="examples-29"><a href="#examples-29">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>slice = [<span class="string">'l'</span>, <span class="string">'o'</span>, <span class="string">'r'</span>, <span class="string">'e'</span>, <span class="string">'m'</span>];
|
||
<span class="kw">let </span><span class="kw-2">mut </span>iter = slice.chunks_exact(<span class="number">2</span>);
|
||
<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&</span>[<span class="string">'l'</span>, <span class="string">'o'</span>]);
|
||
<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&</span>[<span class="string">'r'</span>, <span class="string">'e'</span>]);
|
||
<span class="macro">assert!</span>(iter.next().is_none());
|
||
<span class="macro">assert_eq!</span>(iter.remainder(), <span class="kw-2">&</span>[<span class="string">'m'</span>]);</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.chunks_exact_mut" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.31.0">1.31.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.67.0/src/core/slice/mod.rs.html#937">source</a></span><h4 class="code-header">pub fn <a href="#method.chunks_exact_mut" class="fn">chunks_exact_mut</a>(&mut self, chunk_size: <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.usize.html">usize</a>) -> <a class="struct" href="https://doc.rust-lang.org/1.67.0/core/slice/iter/struct.ChunksExactMut.html" title="struct core::slice::iter::ChunksExactMut">ChunksExactMut</a><'_, T></h4></section></summary><div class="docblock"><p>Returns an iterator over <code>chunk_size</code> elements of the slice at a time, starting at the
|
||
beginning of the slice.</p>
|
||
<p>The chunks are mutable slices, and do not overlap. If <code>chunk_size</code> does not divide the
|
||
length of the slice, then the last up to <code>chunk_size-1</code> elements will be omitted and can be
|
||
retrieved from the <code>into_remainder</code> function of the iterator.</p>
|
||
<p>Due to each chunk having exactly <code>chunk_size</code> elements, the compiler can often optimize the
|
||
resulting code better than in the case of <a href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html#method.chunks_mut"><code>chunks_mut</code></a>.</p>
|
||
<p>See <a href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html#method.chunks_mut"><code>chunks_mut</code></a> for a variant of this iterator that also returns the remainder as a
|
||
smaller chunk, and <a href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html#method.rchunks_exact_mut"><code>rchunks_exact_mut</code></a> for the same iterator but starting at the end of
|
||
the slice.</p>
|
||
<h5 id="panics-5"><a href="#panics-5">Panics</a></h5>
|
||
<p>Panics if <code>chunk_size</code> is 0.</p>
|
||
<h5 id="examples-30"><a href="#examples-30">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>v = <span class="kw-2">&mut </span>[<span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>];
|
||
<span class="kw">let </span><span class="kw-2">mut </span>count = <span class="number">1</span>;
|
||
|
||
<span class="kw">for </span>chunk <span class="kw">in </span>v.chunks_exact_mut(<span class="number">2</span>) {
|
||
<span class="kw">for </span>elem <span class="kw">in </span>chunk.iter_mut() {
|
||
<span class="kw-2">*</span>elem += count;
|
||
}
|
||
count += <span class="number">1</span>;
|
||
}
|
||
<span class="macro">assert_eq!</span>(v, <span class="kw-2">&</span>[<span class="number">1</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">2</span>, <span class="number">0</span>]);</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_chunks_unchecked" class="method has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.67.0/src/core/slice/mod.rs.html#972">source</a><h4 class="code-header">pub unsafe fn <a href="#method.as_chunks_unchecked" class="fn">as_chunks_unchecked</a><const N: <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.usize.html">usize</a>>(&self) -> &[<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; N]</a>]</h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_as_chunks</code>)</span></div></span></summary><div class="docblock"><p>Splits the slice into a slice of <code>N</code>-element arrays,
|
||
assuming that there’s no remainder.</p>
|
||
<h5 id="safety-3"><a href="#safety-3">Safety</a></h5>
|
||
<p>This may only be called when</p>
|
||
<ul>
|
||
<li>The slice splits exactly into <code>N</code>-element chunks (aka <code>self.len() % N == 0</code>).</li>
|
||
<li><code>N != 0</code>.</li>
|
||
</ul>
|
||
<h5 id="examples-31"><a href="#examples-31">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_as_chunks)]
|
||
</span><span class="kw">let </span>slice: <span class="kw-2">&</span>[char] = <span class="kw-2">&</span>[<span class="string">'l'</span>, <span class="string">'o'</span>, <span class="string">'r'</span>, <span class="string">'e'</span>, <span class="string">'m'</span>, <span class="string">'!'</span>];
|
||
<span class="kw">let </span>chunks: <span class="kw-2">&</span>[[char; <span class="number">1</span>]] =
|
||
<span class="comment">// SAFETY: 1-element chunks never have remainder
|
||
</span><span class="kw">unsafe </span>{ slice.as_chunks_unchecked() };
|
||
<span class="macro">assert_eq!</span>(chunks, <span class="kw-2">&</span>[[<span class="string">'l'</span>], [<span class="string">'o'</span>], [<span class="string">'r'</span>], [<span class="string">'e'</span>], [<span class="string">'m'</span>], [<span class="string">'!'</span>]]);
|
||
<span class="kw">let </span>chunks: <span class="kw-2">&</span>[[char; <span class="number">3</span>]] =
|
||
<span class="comment">// SAFETY: The slice length (6) is a multiple of 3
|
||
</span><span class="kw">unsafe </span>{ slice.as_chunks_unchecked() };
|
||
<span class="macro">assert_eq!</span>(chunks, <span class="kw-2">&</span>[[<span class="string">'l'</span>, <span class="string">'o'</span>, <span class="string">'r'</span>], [<span class="string">'e'</span>, <span class="string">'m'</span>, <span class="string">'!'</span>]]);
|
||
|
||
<span class="comment">// These would be unsound:
|
||
// let chunks: &[[_; 5]] = slice.as_chunks_unchecked() // The slice length is not a multiple of 5
|
||
// let chunks: &[[_; 0]] = slice.as_chunks_unchecked() // Zero-length chunks are never allowed</span></code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_chunks" class="method has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.67.0/src/core/slice/mod.rs.html#1008">source</a><h4 class="code-header">pub fn <a href="#method.as_chunks" class="fn">as_chunks</a><const N: <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.usize.html">usize</a>>(&self) -> (&[<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; N]</a>], &<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html">[T]</a>)</h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_as_chunks</code>)</span></div></span></summary><div class="docblock"><p>Splits the slice into a slice of <code>N</code>-element arrays,
|
||
starting at the beginning of the slice,
|
||
and a remainder slice with length strictly less than <code>N</code>.</p>
|
||
<h5 id="panics-6"><a href="#panics-6">Panics</a></h5>
|
||
<p>Panics if <code>N</code> is 0. This check will most probably get changed to a compile time
|
||
error before this method gets stabilized.</p>
|
||
<h5 id="examples-32"><a href="#examples-32">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_as_chunks)]
|
||
</span><span class="kw">let </span>slice = [<span class="string">'l'</span>, <span class="string">'o'</span>, <span class="string">'r'</span>, <span class="string">'e'</span>, <span class="string">'m'</span>];
|
||
<span class="kw">let </span>(chunks, remainder) = slice.as_chunks();
|
||
<span class="macro">assert_eq!</span>(chunks, <span class="kw-2">&</span>[[<span class="string">'l'</span>, <span class="string">'o'</span>], [<span class="string">'r'</span>, <span class="string">'e'</span>]]);
|
||
<span class="macro">assert_eq!</span>(remainder, <span class="kw-2">&</span>[<span class="string">'m'</span>]);</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_rchunks" class="method has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.67.0/src/core/slice/mod.rs.html#1039">source</a><h4 class="code-header">pub fn <a href="#method.as_rchunks" class="fn">as_rchunks</a><const N: <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.usize.html">usize</a>>(&self) -> (&<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html">[T]</a>, &[<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; N]</a>])</h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_as_chunks</code>)</span></div></span></summary><div class="docblock"><p>Splits the slice into a slice of <code>N</code>-element arrays,
|
||
starting at the end of the slice,
|
||
and a remainder slice with length strictly less than <code>N</code>.</p>
|
||
<h5 id="panics-7"><a href="#panics-7">Panics</a></h5>
|
||
<p>Panics if <code>N</code> is 0. This check will most probably get changed to a compile time
|
||
error before this method gets stabilized.</p>
|
||
<h5 id="examples-33"><a href="#examples-33">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_as_chunks)]
|
||
</span><span class="kw">let </span>slice = [<span class="string">'l'</span>, <span class="string">'o'</span>, <span class="string">'r'</span>, <span class="string">'e'</span>, <span class="string">'m'</span>];
|
||
<span class="kw">let </span>(remainder, chunks) = slice.as_rchunks();
|
||
<span class="macro">assert_eq!</span>(remainder, <span class="kw-2">&</span>[<span class="string">'l'</span>]);
|
||
<span class="macro">assert_eq!</span>(chunks, <span class="kw-2">&</span>[[<span class="string">'o'</span>, <span class="string">'r'</span>], [<span class="string">'e'</span>, <span class="string">'m'</span>]]);</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.array_chunks" class="method has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.67.0/src/core/slice/mod.rs.html#1078">source</a><h4 class="code-header">pub fn <a href="#method.array_chunks" class="fn">array_chunks</a><const N: <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.usize.html">usize</a>>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.67.0/core/slice/iter/struct.ArrayChunks.html" title="struct core::slice::iter::ArrayChunks">ArrayChunks</a><'_, T, N></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>array_chunks</code>)</span></div></span></summary><div class="docblock"><p>Returns an iterator over <code>N</code> elements of the slice at a time, starting at the
|
||
beginning of the slice.</p>
|
||
<p>The chunks are array references and do not overlap. If <code>N</code> does not divide the
|
||
length of the slice, then the last up to <code>N-1</code> elements will be omitted and can be
|
||
retrieved from the <code>remainder</code> function of the iterator.</p>
|
||
<p>This method is the const generic equivalent of <a href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html#method.chunks_exact"><code>chunks_exact</code></a>.</p>
|
||
<h5 id="panics-8"><a href="#panics-8">Panics</a></h5>
|
||
<p>Panics if <code>N</code> is 0. This check will most probably get changed to a compile time
|
||
error before this method gets stabilized.</p>
|
||
<h5 id="examples-34"><a href="#examples-34">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(array_chunks)]
|
||
</span><span class="kw">let </span>slice = [<span class="string">'l'</span>, <span class="string">'o'</span>, <span class="string">'r'</span>, <span class="string">'e'</span>, <span class="string">'m'</span>];
|
||
<span class="kw">let </span><span class="kw-2">mut </span>iter = slice.array_chunks();
|
||
<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&</span>[<span class="string">'l'</span>, <span class="string">'o'</span>]);
|
||
<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&</span>[<span class="string">'r'</span>, <span class="string">'e'</span>]);
|
||
<span class="macro">assert!</span>(iter.next().is_none());
|
||
<span class="macro">assert_eq!</span>(iter.remainder(), <span class="kw-2">&</span>[<span class="string">'m'</span>]);</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_chunks_unchecked_mut" class="method has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.67.0/src/core/slice/mod.rs.html#1115">source</a><h4 class="code-header">pub unsafe fn <a href="#method.as_chunks_unchecked_mut" class="fn">as_chunks_unchecked_mut</a><const N: <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.usize.html">usize</a>>(<br> &mut self<br>) -> &mut [<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; N]</a>]</h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_as_chunks</code>)</span></div></span></summary><div class="docblock"><p>Splits the slice into a slice of <code>N</code>-element arrays,
|
||
assuming that there’s no remainder.</p>
|
||
<h5 id="safety-4"><a href="#safety-4">Safety</a></h5>
|
||
<p>This may only be called when</p>
|
||
<ul>
|
||
<li>The slice splits exactly into <code>N</code>-element chunks (aka <code>self.len() % N == 0</code>).</li>
|
||
<li><code>N != 0</code>.</li>
|
||
</ul>
|
||
<h5 id="examples-35"><a href="#examples-35">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_as_chunks)]
|
||
</span><span class="kw">let </span>slice: <span class="kw-2">&mut </span>[char] = <span class="kw-2">&mut </span>[<span class="string">'l'</span>, <span class="string">'o'</span>, <span class="string">'r'</span>, <span class="string">'e'</span>, <span class="string">'m'</span>, <span class="string">'!'</span>];
|
||
<span class="kw">let </span>chunks: <span class="kw-2">&mut </span>[[char; <span class="number">1</span>]] =
|
||
<span class="comment">// SAFETY: 1-element chunks never have remainder
|
||
</span><span class="kw">unsafe </span>{ slice.as_chunks_unchecked_mut() };
|
||
chunks[<span class="number">0</span>] = [<span class="string">'L'</span>];
|
||
<span class="macro">assert_eq!</span>(chunks, <span class="kw-2">&</span>[[<span class="string">'L'</span>], [<span class="string">'o'</span>], [<span class="string">'r'</span>], [<span class="string">'e'</span>], [<span class="string">'m'</span>], [<span class="string">'!'</span>]]);
|
||
<span class="kw">let </span>chunks: <span class="kw-2">&mut </span>[[char; <span class="number">3</span>]] =
|
||
<span class="comment">// SAFETY: The slice length (6) is a multiple of 3
|
||
</span><span class="kw">unsafe </span>{ slice.as_chunks_unchecked_mut() };
|
||
chunks[<span class="number">1</span>] = [<span class="string">'a'</span>, <span class="string">'x'</span>, <span class="string">'?'</span>];
|
||
<span class="macro">assert_eq!</span>(slice, <span class="kw-2">&</span>[<span class="string">'L'</span>, <span class="string">'o'</span>, <span class="string">'r'</span>, <span class="string">'a'</span>, <span class="string">'x'</span>, <span class="string">'?'</span>]);
|
||
|
||
<span class="comment">// These would be unsound:
|
||
// let chunks: &[[_; 5]] = slice.as_chunks_unchecked_mut() // The slice length is not a multiple of 5
|
||
// let chunks: &[[_; 0]] = slice.as_chunks_unchecked_mut() // Zero-length chunks are never allowed</span></code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_chunks_mut" class="method has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.67.0/src/core/slice/mod.rs.html#1157">source</a><h4 class="code-header">pub fn <a href="#method.as_chunks_mut" class="fn">as_chunks_mut</a><const N: <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.usize.html">usize</a>>(&mut self) -> (&mut [<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; N]</a>], &mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html">[T]</a>)</h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_as_chunks</code>)</span></div></span></summary><div class="docblock"><p>Splits the slice into a slice of <code>N</code>-element arrays,
|
||
starting at the beginning of the slice,
|
||
and a remainder slice with length strictly less than <code>N</code>.</p>
|
||
<h5 id="panics-9"><a href="#panics-9">Panics</a></h5>
|
||
<p>Panics if <code>N</code> is 0. This check will most probably get changed to a compile time
|
||
error before this method gets stabilized.</p>
|
||
<h5 id="examples-36"><a href="#examples-36">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_as_chunks)]
|
||
</span><span class="kw">let </span>v = <span class="kw-2">&mut </span>[<span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>];
|
||
<span class="kw">let </span><span class="kw-2">mut </span>count = <span class="number">1</span>;
|
||
|
||
<span class="kw">let </span>(chunks, remainder) = v.as_chunks_mut();
|
||
remainder[<span class="number">0</span>] = <span class="number">9</span>;
|
||
<span class="kw">for </span>chunk <span class="kw">in </span>chunks {
|
||
<span class="kw-2">*</span>chunk = [count; <span class="number">2</span>];
|
||
count += <span class="number">1</span>;
|
||
}
|
||
<span class="macro">assert_eq!</span>(v, <span class="kw-2">&</span>[<span class="number">1</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">2</span>, <span class="number">9</span>]);</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_rchunks_mut" class="method has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.67.0/src/core/slice/mod.rs.html#1194">source</a><h4 class="code-header">pub fn <a href="#method.as_rchunks_mut" class="fn">as_rchunks_mut</a><const N: <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.usize.html">usize</a>>(&mut self) -> (&mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html">[T]</a>, &mut [<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; N]</a>])</h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_as_chunks</code>)</span></div></span></summary><div class="docblock"><p>Splits the slice into a slice of <code>N</code>-element arrays,
|
||
starting at the end of the slice,
|
||
and a remainder slice with length strictly less than <code>N</code>.</p>
|
||
<h5 id="panics-10"><a href="#panics-10">Panics</a></h5>
|
||
<p>Panics if <code>N</code> is 0. This check will most probably get changed to a compile time
|
||
error before this method gets stabilized.</p>
|
||
<h5 id="examples-37"><a href="#examples-37">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_as_chunks)]
|
||
</span><span class="kw">let </span>v = <span class="kw-2">&mut </span>[<span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>];
|
||
<span class="kw">let </span><span class="kw-2">mut </span>count = <span class="number">1</span>;
|
||
|
||
<span class="kw">let </span>(remainder, chunks) = v.as_rchunks_mut();
|
||
remainder[<span class="number">0</span>] = <span class="number">9</span>;
|
||
<span class="kw">for </span>chunk <span class="kw">in </span>chunks {
|
||
<span class="kw-2">*</span>chunk = [count; <span class="number">2</span>];
|
||
count += <span class="number">1</span>;
|
||
}
|
||
<span class="macro">assert_eq!</span>(v, <span class="kw-2">&</span>[<span class="number">9</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">2</span>]);</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.array_chunks_mut" class="method has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.67.0/src/core/slice/mod.rs.html#1235">source</a><h4 class="code-header">pub fn <a href="#method.array_chunks_mut" class="fn">array_chunks_mut</a><const N: <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.usize.html">usize</a>>(&mut self) -> <a class="struct" href="https://doc.rust-lang.org/1.67.0/core/slice/iter/struct.ArrayChunksMut.html" title="struct core::slice::iter::ArrayChunksMut">ArrayChunksMut</a><'_, T, N></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>array_chunks</code>)</span></div></span></summary><div class="docblock"><p>Returns an iterator over <code>N</code> elements of the slice at a time, starting at the
|
||
beginning of the slice.</p>
|
||
<p>The chunks are mutable array references and do not overlap. If <code>N</code> does not divide
|
||
the length of the slice, then the last up to <code>N-1</code> elements will be omitted and
|
||
can be retrieved from the <code>into_remainder</code> function of the iterator.</p>
|
||
<p>This method is the const generic equivalent of <a href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html#method.chunks_exact_mut"><code>chunks_exact_mut</code></a>.</p>
|
||
<h5 id="panics-11"><a href="#panics-11">Panics</a></h5>
|
||
<p>Panics if <code>N</code> is 0. This check will most probably get changed to a compile time
|
||
error before this method gets stabilized.</p>
|
||
<h5 id="examples-38"><a href="#examples-38">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(array_chunks)]
|
||
</span><span class="kw">let </span>v = <span class="kw-2">&mut </span>[<span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>];
|
||
<span class="kw">let </span><span class="kw-2">mut </span>count = <span class="number">1</span>;
|
||
|
||
<span class="kw">for </span>chunk <span class="kw">in </span>v.array_chunks_mut() {
|
||
<span class="kw-2">*</span>chunk = [count; <span class="number">2</span>];
|
||
count += <span class="number">1</span>;
|
||
}
|
||
<span class="macro">assert_eq!</span>(v, <span class="kw-2">&</span>[<span class="number">1</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">2</span>, <span class="number">0</span>]);</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.array_windows" class="method has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.67.0/src/core/slice/mod.rs.html#1267">source</a><h4 class="code-header">pub fn <a href="#method.array_windows" class="fn">array_windows</a><const N: <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.usize.html">usize</a>>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.67.0/core/slice/iter/struct.ArrayWindows.html" title="struct core::slice::iter::ArrayWindows">ArrayWindows</a><'_, T, N></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>array_windows</code>)</span></div></span></summary><div class="docblock"><p>Returns an iterator over overlapping windows of <code>N</code> elements of a slice,
|
||
starting at the beginning of the slice.</p>
|
||
<p>This is the const generic equivalent of <a href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html#method.windows"><code>windows</code></a>.</p>
|
||
<p>If <code>N</code> is greater than the size of the slice, it will return no windows.</p>
|
||
<h5 id="panics-12"><a href="#panics-12">Panics</a></h5>
|
||
<p>Panics if <code>N</code> is 0. This check will most probably get changed to a compile time
|
||
error before this method gets stabilized.</p>
|
||
<h5 id="examples-39"><a href="#examples-39">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(array_windows)]
|
||
</span><span class="kw">let </span>slice = [<span class="number">0</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>];
|
||
<span class="kw">let </span><span class="kw-2">mut </span>iter = slice.array_windows();
|
||
<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&</span>[<span class="number">0</span>, <span class="number">1</span>]);
|
||
<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&</span>[<span class="number">1</span>, <span class="number">2</span>]);
|
||
<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&</span>[<span class="number">2</span>, <span class="number">3</span>]);
|
||
<span class="macro">assert!</span>(iter.next().is_none());</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.rchunks" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.31.0">1.31.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.67.0/src/core/slice/mod.rs.html#1301">source</a></span><h4 class="code-header">pub fn <a href="#method.rchunks" class="fn">rchunks</a>(&self, chunk_size: <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.usize.html">usize</a>) -> <a class="struct" href="https://doc.rust-lang.org/1.67.0/core/slice/iter/struct.RChunks.html" title="struct core::slice::iter::RChunks">RChunks</a><'_, T></h4></section></summary><div class="docblock"><p>Returns an iterator over <code>chunk_size</code> elements of the slice at a time, starting at the end
|
||
of the slice.</p>
|
||
<p>The chunks are slices and do not overlap. If <code>chunk_size</code> does not divide the length of the
|
||
slice, then the last chunk will not have length <code>chunk_size</code>.</p>
|
||
<p>See <a href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html#method.rchunks_exact"><code>rchunks_exact</code></a> for a variant of this iterator that returns chunks of always exactly
|
||
<code>chunk_size</code> elements, and <a href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html#method.chunks"><code>chunks</code></a> for the same iterator but starting at the beginning
|
||
of the slice.</p>
|
||
<h5 id="panics-13"><a href="#panics-13">Panics</a></h5>
|
||
<p>Panics if <code>chunk_size</code> is 0.</p>
|
||
<h5 id="examples-40"><a href="#examples-40">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>slice = [<span class="string">'l'</span>, <span class="string">'o'</span>, <span class="string">'r'</span>, <span class="string">'e'</span>, <span class="string">'m'</span>];
|
||
<span class="kw">let </span><span class="kw-2">mut </span>iter = slice.rchunks(<span class="number">2</span>);
|
||
<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&</span>[<span class="string">'e'</span>, <span class="string">'m'</span>]);
|
||
<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&</span>[<span class="string">'o'</span>, <span class="string">'r'</span>]);
|
||
<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&</span>[<span class="string">'l'</span>]);
|
||
<span class="macro">assert!</span>(iter.next().is_none());</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.rchunks_mut" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.31.0">1.31.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.67.0/src/core/slice/mod.rs.html#1339">source</a></span><h4 class="code-header">pub fn <a href="#method.rchunks_mut" class="fn">rchunks_mut</a>(&mut self, chunk_size: <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.usize.html">usize</a>) -> <a class="struct" href="https://doc.rust-lang.org/1.67.0/core/slice/iter/struct.RChunksMut.html" title="struct core::slice::iter::RChunksMut">RChunksMut</a><'_, T></h4></section></summary><div class="docblock"><p>Returns an iterator over <code>chunk_size</code> elements of the slice at a time, starting at the end
|
||
of the slice.</p>
|
||
<p>The chunks are mutable slices, and do not overlap. If <code>chunk_size</code> does not divide the
|
||
length of the slice, then the last chunk will not have length <code>chunk_size</code>.</p>
|
||
<p>See <a href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html#method.rchunks_exact_mut"><code>rchunks_exact_mut</code></a> for a variant of this iterator that returns chunks of always
|
||
exactly <code>chunk_size</code> elements, and <a href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html#method.chunks_mut"><code>chunks_mut</code></a> for the same iterator but starting at the
|
||
beginning of the slice.</p>
|
||
<h5 id="panics-14"><a href="#panics-14">Panics</a></h5>
|
||
<p>Panics if <code>chunk_size</code> is 0.</p>
|
||
<h5 id="examples-41"><a href="#examples-41">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>v = <span class="kw-2">&mut </span>[<span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>];
|
||
<span class="kw">let </span><span class="kw-2">mut </span>count = <span class="number">1</span>;
|
||
|
||
<span class="kw">for </span>chunk <span class="kw">in </span>v.rchunks_mut(<span class="number">2</span>) {
|
||
<span class="kw">for </span>elem <span class="kw">in </span>chunk.iter_mut() {
|
||
<span class="kw-2">*</span>elem += count;
|
||
}
|
||
count += <span class="number">1</span>;
|
||
}
|
||
<span class="macro">assert_eq!</span>(v, <span class="kw-2">&</span>[<span class="number">3</span>, <span class="number">2</span>, <span class="number">2</span>, <span class="number">1</span>, <span class="number">1</span>]);</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.rchunks_exact" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.31.0">1.31.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.67.0/src/core/slice/mod.rs.html#1378">source</a></span><h4 class="code-header">pub fn <a href="#method.rchunks_exact" class="fn">rchunks_exact</a>(&self, chunk_size: <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.usize.html">usize</a>) -> <a class="struct" href="https://doc.rust-lang.org/1.67.0/core/slice/iter/struct.RChunksExact.html" title="struct core::slice::iter::RChunksExact">RChunksExact</a><'_, T></h4></section></summary><div class="docblock"><p>Returns an iterator over <code>chunk_size</code> elements of the slice at a time, starting at the
|
||
end of the slice.</p>
|
||
<p>The chunks are slices and do not overlap. If <code>chunk_size</code> does not divide the length of the
|
||
slice, then the last up to <code>chunk_size-1</code> elements will be omitted and can be retrieved
|
||
from the <code>remainder</code> function of the iterator.</p>
|
||
<p>Due to each chunk having exactly <code>chunk_size</code> elements, the compiler can often optimize the
|
||
resulting code better than in the case of <a href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html#method.rchunks"><code>rchunks</code></a>.</p>
|
||
<p>See <a href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html#method.rchunks"><code>rchunks</code></a> for a variant of this iterator that also returns the remainder as a smaller
|
||
chunk, and <a href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html#method.chunks_exact"><code>chunks_exact</code></a> for the same iterator but starting at the beginning of the
|
||
slice.</p>
|
||
<h5 id="panics-15"><a href="#panics-15">Panics</a></h5>
|
||
<p>Panics if <code>chunk_size</code> is 0.</p>
|
||
<h5 id="examples-42"><a href="#examples-42">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>slice = [<span class="string">'l'</span>, <span class="string">'o'</span>, <span class="string">'r'</span>, <span class="string">'e'</span>, <span class="string">'m'</span>];
|
||
<span class="kw">let </span><span class="kw-2">mut </span>iter = slice.rchunks_exact(<span class="number">2</span>);
|
||
<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&</span>[<span class="string">'e'</span>, <span class="string">'m'</span>]);
|
||
<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&</span>[<span class="string">'o'</span>, <span class="string">'r'</span>]);
|
||
<span class="macro">assert!</span>(iter.next().is_none());
|
||
<span class="macro">assert_eq!</span>(iter.remainder(), <span class="kw-2">&</span>[<span class="string">'l'</span>]);</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.rchunks_exact_mut" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.31.0">1.31.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.67.0/src/core/slice/mod.rs.html#1421">source</a></span><h4 class="code-header">pub fn <a href="#method.rchunks_exact_mut" class="fn">rchunks_exact_mut</a>(&mut self, chunk_size: <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.usize.html">usize</a>) -> <a class="struct" href="https://doc.rust-lang.org/1.67.0/core/slice/iter/struct.RChunksExactMut.html" title="struct core::slice::iter::RChunksExactMut">RChunksExactMut</a><'_, T></h4></section></summary><div class="docblock"><p>Returns an iterator over <code>chunk_size</code> elements of the slice at a time, starting at the end
|
||
of the slice.</p>
|
||
<p>The chunks are mutable slices, and do not overlap. If <code>chunk_size</code> does not divide the
|
||
length of the slice, then the last up to <code>chunk_size-1</code> elements will be omitted and can be
|
||
retrieved from the <code>into_remainder</code> function of the iterator.</p>
|
||
<p>Due to each chunk having exactly <code>chunk_size</code> elements, the compiler can often optimize the
|
||
resulting code better than in the case of <a href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html#method.chunks_mut"><code>chunks_mut</code></a>.</p>
|
||
<p>See <a href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html#method.rchunks_mut"><code>rchunks_mut</code></a> for a variant of this iterator that also returns the remainder as a
|
||
smaller chunk, and <a href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html#method.chunks_exact_mut"><code>chunks_exact_mut</code></a> for the same iterator but starting at the beginning
|
||
of the slice.</p>
|
||
<h5 id="panics-16"><a href="#panics-16">Panics</a></h5>
|
||
<p>Panics if <code>chunk_size</code> is 0.</p>
|
||
<h5 id="examples-43"><a href="#examples-43">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>v = <span class="kw-2">&mut </span>[<span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>];
|
||
<span class="kw">let </span><span class="kw-2">mut </span>count = <span class="number">1</span>;
|
||
|
||
<span class="kw">for </span>chunk <span class="kw">in </span>v.rchunks_exact_mut(<span class="number">2</span>) {
|
||
<span class="kw">for </span>elem <span class="kw">in </span>chunk.iter_mut() {
|
||
<span class="kw-2">*</span>elem += count;
|
||
}
|
||
count += <span class="number">1</span>;
|
||
}
|
||
<span class="macro">assert_eq!</span>(v, <span class="kw-2">&</span>[<span class="number">0</span>, <span class="number">2</span>, <span class="number">2</span>, <span class="number">1</span>, <span class="number">1</span>]);</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.group_by" class="method has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.67.0/src/core/slice/mod.rs.html#1464-1466">source</a><h4 class="code-header">pub fn <a href="#method.group_by" class="fn">group_by</a><F>(&self, pred: F) -> <a class="struct" href="https://doc.rust-lang.org/1.67.0/core/slice/iter/struct.GroupBy.html" title="struct core::slice::iter::GroupBy">GroupBy</a><'_, T, F><span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.reference.html">&</a>T, <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.reference.html">&</a>T) -> <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.bool.html">bool</a>,</span></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_group_by</code>)</span></div></span></summary><div class="docblock"><p>Returns an iterator over the slice producing non-overlapping runs
|
||
of elements using the predicate to separate them.</p>
|
||
<p>The predicate is called on two elements following themselves,
|
||
it means the predicate is called on <code>slice[0]</code> and <code>slice[1]</code>
|
||
then on <code>slice[1]</code> and <code>slice[2]</code> and so on.</p>
|
||
<h5 id="examples-44"><a href="#examples-44">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_group_by)]
|
||
|
||
</span><span class="kw">let </span>slice = <span class="kw-2">&</span>[<span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">3</span>, <span class="number">3</span>, <span class="number">2</span>, <span class="number">2</span>, <span class="number">2</span>];
|
||
|
||
<span class="kw">let </span><span class="kw-2">mut </span>iter = slice.group_by(|a, b| a == b);
|
||
|
||
<span class="macro">assert_eq!</span>(iter.next(), <span class="prelude-val">Some</span>(<span class="kw-2">&</span>[<span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>][..]));
|
||
<span class="macro">assert_eq!</span>(iter.next(), <span class="prelude-val">Some</span>(<span class="kw-2">&</span>[<span class="number">3</span>, <span class="number">3</span>][..]));
|
||
<span class="macro">assert_eq!</span>(iter.next(), <span class="prelude-val">Some</span>(<span class="kw-2">&</span>[<span class="number">2</span>, <span class="number">2</span>, <span class="number">2</span>][..]));
|
||
<span class="macro">assert_eq!</span>(iter.next(), <span class="prelude-val">None</span>);</code></pre></div>
|
||
<p>This method can be used to extract the sorted subslices:</p>
|
||
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_group_by)]
|
||
|
||
</span><span class="kw">let </span>slice = <span class="kw-2">&</span>[<span class="number">1</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>];
|
||
|
||
<span class="kw">let </span><span class="kw-2">mut </span>iter = slice.group_by(|a, b| a <= b);
|
||
|
||
<span class="macro">assert_eq!</span>(iter.next(), <span class="prelude-val">Some</span>(<span class="kw-2">&</span>[<span class="number">1</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>][..]));
|
||
<span class="macro">assert_eq!</span>(iter.next(), <span class="prelude-val">Some</span>(<span class="kw-2">&</span>[<span class="number">2</span>, <span class="number">3</span>][..]));
|
||
<span class="macro">assert_eq!</span>(iter.next(), <span class="prelude-val">Some</span>(<span class="kw-2">&</span>[<span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>][..]));
|
||
<span class="macro">assert_eq!</span>(iter.next(), <span class="prelude-val">None</span>);</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.group_by_mut" class="method has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.67.0/src/core/slice/mod.rs.html#1509-1511">source</a><h4 class="code-header">pub fn <a href="#method.group_by_mut" class="fn">group_by_mut</a><F>(&mut self, pred: F) -> <a class="struct" href="https://doc.rust-lang.org/1.67.0/core/slice/iter/struct.GroupByMut.html" title="struct core::slice::iter::GroupByMut">GroupByMut</a><'_, T, F><span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.reference.html">&</a>T, <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.reference.html">&</a>T) -> <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.bool.html">bool</a>,</span></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_group_by</code>)</span></div></span></summary><div class="docblock"><p>Returns an iterator over the slice producing non-overlapping mutable
|
||
runs of elements using the predicate to separate them.</p>
|
||
<p>The predicate is called on two elements following themselves,
|
||
it means the predicate is called on <code>slice[0]</code> and <code>slice[1]</code>
|
||
then on <code>slice[1]</code> and <code>slice[2]</code> and so on.</p>
|
||
<h5 id="examples-45"><a href="#examples-45">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_group_by)]
|
||
|
||
</span><span class="kw">let </span>slice = <span class="kw-2">&mut </span>[<span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">3</span>, <span class="number">3</span>, <span class="number">2</span>, <span class="number">2</span>, <span class="number">2</span>];
|
||
|
||
<span class="kw">let </span><span class="kw-2">mut </span>iter = slice.group_by_mut(|a, b| a == b);
|
||
|
||
<span class="macro">assert_eq!</span>(iter.next(), <span class="prelude-val">Some</span>(<span class="kw-2">&mut </span>[<span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>][..]));
|
||
<span class="macro">assert_eq!</span>(iter.next(), <span class="prelude-val">Some</span>(<span class="kw-2">&mut </span>[<span class="number">3</span>, <span class="number">3</span>][..]));
|
||
<span class="macro">assert_eq!</span>(iter.next(), <span class="prelude-val">Some</span>(<span class="kw-2">&mut </span>[<span class="number">2</span>, <span class="number">2</span>, <span class="number">2</span>][..]));
|
||
<span class="macro">assert_eq!</span>(iter.next(), <span class="prelude-val">None</span>);</code></pre></div>
|
||
<p>This method can be used to extract the sorted subslices:</p>
|
||
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_group_by)]
|
||
|
||
</span><span class="kw">let </span>slice = <span class="kw-2">&mut </span>[<span class="number">1</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>];
|
||
|
||
<span class="kw">let </span><span class="kw-2">mut </span>iter = slice.group_by_mut(|a, b| a <= b);
|
||
|
||
<span class="macro">assert_eq!</span>(iter.next(), <span class="prelude-val">Some</span>(<span class="kw-2">&mut </span>[<span class="number">1</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>][..]));
|
||
<span class="macro">assert_eq!</span>(iter.next(), <span class="prelude-val">Some</span>(<span class="kw-2">&mut </span>[<span class="number">2</span>, <span class="number">3</span>][..]));
|
||
<span class="macro">assert_eq!</span>(iter.next(), <span class="prelude-val">Some</span>(<span class="kw-2">&mut </span>[<span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>][..]));
|
||
<span class="macro">assert_eq!</span>(iter.next(), <span class="prelude-val">None</span>);</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.split_at" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.67.0/src/core/slice/mod.rs.html#1554">source</a></span><h4 class="code-header">pub fn <a href="#method.split_at" class="fn">split_at</a>(&self, mid: <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.usize.html">usize</a>) -> (&<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html">[T]</a>, &<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html">[T]</a>)</h4></section></summary><div class="docblock"><p>Divides one slice into two at an index.</p>
|
||
<p>The first will contain all indices from <code>[0, mid)</code> (excluding
|
||
the index <code>mid</code> itself) and the second will contain all
|
||
indices from <code>[mid, len)</code> (excluding the index <code>len</code> itself).</p>
|
||
<h5 id="panics-17"><a href="#panics-17">Panics</a></h5>
|
||
<p>Panics if <code>mid > len</code>.</p>
|
||
<h5 id="examples-46"><a href="#examples-46">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>v = [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>];
|
||
|
||
{
|
||
<span class="kw">let </span>(left, right) = v.split_at(<span class="number">0</span>);
|
||
<span class="macro">assert_eq!</span>(left, []);
|
||
<span class="macro">assert_eq!</span>(right, [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>]);
|
||
}
|
||
|
||
{
|
||
<span class="kw">let </span>(left, right) = v.split_at(<span class="number">2</span>);
|
||
<span class="macro">assert_eq!</span>(left, [<span class="number">1</span>, <span class="number">2</span>]);
|
||
<span class="macro">assert_eq!</span>(right, [<span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>]);
|
||
}
|
||
|
||
{
|
||
<span class="kw">let </span>(left, right) = v.split_at(<span class="number">6</span>);
|
||
<span class="macro">assert_eq!</span>(left, [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>]);
|
||
<span class="macro">assert_eq!</span>(right, []);
|
||
}</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.split_at_mut" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.67.0/src/core/slice/mod.rs.html#1587">source</a></span><h4 class="code-header">pub fn <a href="#method.split_at_mut" class="fn">split_at_mut</a>(&mut self, mid: <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.usize.html">usize</a>) -> (&mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html">[T]</a>, &mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html">[T]</a>)</h4></section></summary><div class="docblock"><p>Divides one mutable slice into two at an index.</p>
|
||
<p>The first will contain all indices from <code>[0, mid)</code> (excluding
|
||
the index <code>mid</code> itself) and the second will contain all
|
||
indices from <code>[mid, len)</code> (excluding the index <code>len</code> itself).</p>
|
||
<h5 id="panics-18"><a href="#panics-18">Panics</a></h5>
|
||
<p>Panics if <code>mid > len</code>.</p>
|
||
<h5 id="examples-47"><a href="#examples-47">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>v = [<span class="number">1</span>, <span class="number">0</span>, <span class="number">3</span>, <span class="number">0</span>, <span class="number">5</span>, <span class="number">6</span>];
|
||
<span class="kw">let </span>(left, right) = v.split_at_mut(<span class="number">2</span>);
|
||
<span class="macro">assert_eq!</span>(left, [<span class="number">1</span>, <span class="number">0</span>]);
|
||
<span class="macro">assert_eq!</span>(right, [<span class="number">3</span>, <span class="number">0</span>, <span class="number">5</span>, <span class="number">6</span>]);
|
||
left[<span class="number">1</span>] = <span class="number">2</span>;
|
||
right[<span class="number">1</span>] = <span class="number">4</span>;
|
||
<span class="macro">assert_eq!</span>(v, [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>]);</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.split_at_unchecked" class="method has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.67.0/src/core/slice/mod.rs.html#1640">source</a><h4 class="code-header">pub unsafe fn <a href="#method.split_at_unchecked" class="fn">split_at_unchecked</a>(&self, mid: <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.usize.html">usize</a>) -> (&<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html">[T]</a>, &<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html">[T]</a>)</h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_split_at_unchecked</code>)</span></div></span></summary><div class="docblock"><p>Divides one slice into two at an index, without doing bounds checking.</p>
|
||
<p>The first will contain all indices from <code>[0, mid)</code> (excluding
|
||
the index <code>mid</code> itself) and the second will contain all
|
||
indices from <code>[mid, len)</code> (excluding the index <code>len</code> itself).</p>
|
||
<p>For a safe alternative see <a href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html#method.split_at"><code>split_at</code></a>.</p>
|
||
<h5 id="safety-5"><a href="#safety-5">Safety</a></h5>
|
||
<p>Calling this method with an out-of-bounds index is <em><a href="https://doc.rust-lang.org/reference/behavior-considered-undefined.html">undefined behavior</a></em>
|
||
even if the resulting reference is not used. The caller has to ensure that
|
||
<code>0 <= mid <= self.len()</code>.</p>
|
||
<h5 id="examples-48"><a href="#examples-48">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_split_at_unchecked)]
|
||
|
||
</span><span class="kw">let </span>v = [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>];
|
||
|
||
<span class="kw">unsafe </span>{
|
||
<span class="kw">let </span>(left, right) = v.split_at_unchecked(<span class="number">0</span>);
|
||
<span class="macro">assert_eq!</span>(left, []);
|
||
<span class="macro">assert_eq!</span>(right, [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>]);
|
||
}
|
||
|
||
<span class="kw">unsafe </span>{
|
||
<span class="kw">let </span>(left, right) = v.split_at_unchecked(<span class="number">2</span>);
|
||
<span class="macro">assert_eq!</span>(left, [<span class="number">1</span>, <span class="number">2</span>]);
|
||
<span class="macro">assert_eq!</span>(right, [<span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>]);
|
||
}
|
||
|
||
<span class="kw">unsafe </span>{
|
||
<span class="kw">let </span>(left, right) = v.split_at_unchecked(<span class="number">6</span>);
|
||
<span class="macro">assert_eq!</span>(left, [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>]);
|
||
<span class="macro">assert_eq!</span>(right, []);
|
||
}</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.split_at_mut_unchecked" class="method has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.67.0/src/core/slice/mod.rs.html#1689">source</a><h4 class="code-header">pub unsafe fn <a href="#method.split_at_mut_unchecked" class="fn">split_at_mut_unchecked</a>(<br> &mut self,<br> mid: <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.usize.html">usize</a><br>) -> (&mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html">[T]</a>, &mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html">[T]</a>)</h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_split_at_unchecked</code>)</span></div></span></summary><div class="docblock"><p>Divides one mutable slice into two at an index, without doing bounds checking.</p>
|
||
<p>The first will contain all indices from <code>[0, mid)</code> (excluding
|
||
the index <code>mid</code> itself) and the second will contain all
|
||
indices from <code>[mid, len)</code> (excluding the index <code>len</code> itself).</p>
|
||
<p>For a safe alternative see <a href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html#method.split_at_mut"><code>split_at_mut</code></a>.</p>
|
||
<h5 id="safety-6"><a href="#safety-6">Safety</a></h5>
|
||
<p>Calling this method with an out-of-bounds index is <em><a href="https://doc.rust-lang.org/reference/behavior-considered-undefined.html">undefined behavior</a></em>
|
||
even if the resulting reference is not used. The caller has to ensure that
|
||
<code>0 <= mid <= self.len()</code>.</p>
|
||
<h5 id="examples-49"><a href="#examples-49">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_split_at_unchecked)]
|
||
|
||
</span><span class="kw">let </span><span class="kw-2">mut </span>v = [<span class="number">1</span>, <span class="number">0</span>, <span class="number">3</span>, <span class="number">0</span>, <span class="number">5</span>, <span class="number">6</span>];
|
||
<span class="comment">// scoped to restrict the lifetime of the borrows
|
||
</span><span class="kw">unsafe </span>{
|
||
<span class="kw">let </span>(left, right) = v.split_at_mut_unchecked(<span class="number">2</span>);
|
||
<span class="macro">assert_eq!</span>(left, [<span class="number">1</span>, <span class="number">0</span>]);
|
||
<span class="macro">assert_eq!</span>(right, [<span class="number">3</span>, <span class="number">0</span>, <span class="number">5</span>, <span class="number">6</span>]);
|
||
left[<span class="number">1</span>] = <span class="number">2</span>;
|
||
right[<span class="number">1</span>] = <span class="number">4</span>;
|
||
}
|
||
<span class="macro">assert_eq!</span>(v, [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>]);</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.split_array_ref" class="method has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.67.0/src/core/slice/mod.rs.html#1745">source</a><h4 class="code-header">pub fn <a href="#method.split_array_ref" class="fn">split_array_ref</a><const N: <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.usize.html">usize</a>>(&self) -> (&<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; N]</a>, &<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html">[T]</a>)</h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>split_array</code>)</span></div></span></summary><div class="docblock"><p>Divides one slice into an array and a remainder slice at an index.</p>
|
||
<p>The array will contain all indices from <code>[0, N)</code> (excluding
|
||
the index <code>N</code> itself) and the slice will contain all
|
||
indices from <code>[N, len)</code> (excluding the index <code>len</code> itself).</p>
|
||
<h5 id="panics-19"><a href="#panics-19">Panics</a></h5>
|
||
<p>Panics if <code>N > len</code>.</p>
|
||
<h5 id="examples-50"><a href="#examples-50">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(split_array)]
|
||
|
||
</span><span class="kw">let </span>v = <span class="kw-2">&</span>[<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>][..];
|
||
|
||
{
|
||
<span class="kw">let </span>(left, right) = v.split_array_ref::<<span class="number">0</span>>();
|
||
<span class="macro">assert_eq!</span>(left, <span class="kw-2">&</span>[]);
|
||
<span class="macro">assert_eq!</span>(right, [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>]);
|
||
}
|
||
|
||
{
|
||
<span class="kw">let </span>(left, right) = v.split_array_ref::<<span class="number">2</span>>();
|
||
<span class="macro">assert_eq!</span>(left, <span class="kw-2">&</span>[<span class="number">1</span>, <span class="number">2</span>]);
|
||
<span class="macro">assert_eq!</span>(right, [<span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>]);
|
||
}
|
||
|
||
{
|
||
<span class="kw">let </span>(left, right) = v.split_array_ref::<<span class="number">6</span>>();
|
||
<span class="macro">assert_eq!</span>(left, <span class="kw-2">&</span>[<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>]);
|
||
<span class="macro">assert_eq!</span>(right, []);
|
||
}</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.split_array_mut" class="method has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.67.0/src/core/slice/mod.rs.html#1778">source</a><h4 class="code-header">pub fn <a href="#method.split_array_mut" class="fn">split_array_mut</a><const N: <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.usize.html">usize</a>>(&mut self) -> (&mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; N]</a>, &mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html">[T]</a>)</h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>split_array</code>)</span></div></span></summary><div class="docblock"><p>Divides one mutable slice into an array and a remainder slice at an index.</p>
|
||
<p>The array will contain all indices from <code>[0, N)</code> (excluding
|
||
the index <code>N</code> itself) and the slice will contain all
|
||
indices from <code>[N, len)</code> (excluding the index <code>len</code> itself).</p>
|
||
<h5 id="panics-20"><a href="#panics-20">Panics</a></h5>
|
||
<p>Panics if <code>N > len</code>.</p>
|
||
<h5 id="examples-51"><a href="#examples-51">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(split_array)]
|
||
|
||
</span><span class="kw">let </span><span class="kw-2">mut </span>v = <span class="kw-2">&mut </span>[<span class="number">1</span>, <span class="number">0</span>, <span class="number">3</span>, <span class="number">0</span>, <span class="number">5</span>, <span class="number">6</span>][..];
|
||
<span class="kw">let </span>(left, right) = v.split_array_mut::<<span class="number">2</span>>();
|
||
<span class="macro">assert_eq!</span>(left, <span class="kw-2">&mut </span>[<span class="number">1</span>, <span class="number">0</span>]);
|
||
<span class="macro">assert_eq!</span>(right, [<span class="number">3</span>, <span class="number">0</span>, <span class="number">5</span>, <span class="number">6</span>]);
|
||
left[<span class="number">1</span>] = <span class="number">2</span>;
|
||
right[<span class="number">1</span>] = <span class="number">4</span>;
|
||
<span class="macro">assert_eq!</span>(v, [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>]);</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.rsplit_array_ref" class="method has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.67.0/src/core/slice/mod.rs.html#1823">source</a><h4 class="code-header">pub fn <a href="#method.rsplit_array_ref" class="fn">rsplit_array_ref</a><const N: <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.usize.html">usize</a>>(&self) -> (&<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html">[T]</a>, &<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; N]</a>)</h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>split_array</code>)</span></div></span></summary><div class="docblock"><p>Divides one slice into an array and a remainder slice at an index from
|
||
the end.</p>
|
||
<p>The slice will contain all indices from <code>[0, len - N)</code> (excluding
|
||
the index <code>len - N</code> itself) and the array will contain all
|
||
indices from <code>[len - N, len)</code> (excluding the index <code>len</code> itself).</p>
|
||
<h5 id="panics-21"><a href="#panics-21">Panics</a></h5>
|
||
<p>Panics if <code>N > len</code>.</p>
|
||
<h5 id="examples-52"><a href="#examples-52">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(split_array)]
|
||
|
||
</span><span class="kw">let </span>v = <span class="kw-2">&</span>[<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>][..];
|
||
|
||
{
|
||
<span class="kw">let </span>(left, right) = v.rsplit_array_ref::<<span class="number">0</span>>();
|
||
<span class="macro">assert_eq!</span>(left, [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>]);
|
||
<span class="macro">assert_eq!</span>(right, <span class="kw-2">&</span>[]);
|
||
}
|
||
|
||
{
|
||
<span class="kw">let </span>(left, right) = v.rsplit_array_ref::<<span class="number">2</span>>();
|
||
<span class="macro">assert_eq!</span>(left, [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>]);
|
||
<span class="macro">assert_eq!</span>(right, <span class="kw-2">&</span>[<span class="number">5</span>, <span class="number">6</span>]);
|
||
}
|
||
|
||
{
|
||
<span class="kw">let </span>(left, right) = v.rsplit_array_ref::<<span class="number">6</span>>();
|
||
<span class="macro">assert_eq!</span>(left, []);
|
||
<span class="macro">assert_eq!</span>(right, <span class="kw-2">&</span>[<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>]);
|
||
}</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.rsplit_array_mut" class="method has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.67.0/src/core/slice/mod.rs.html#1857">source</a><h4 class="code-header">pub fn <a href="#method.rsplit_array_mut" class="fn">rsplit_array_mut</a><const N: <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.usize.html">usize</a>>(&mut self) -> (&mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html">[T]</a>, &mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; N]</a>)</h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>split_array</code>)</span></div></span></summary><div class="docblock"><p>Divides one mutable slice into an array and a remainder slice at an
|
||
index from the end.</p>
|
||
<p>The slice will contain all indices from <code>[0, len - N)</code> (excluding
|
||
the index <code>N</code> itself) and the array will contain all
|
||
indices from <code>[len - N, len)</code> (excluding the index <code>len</code> itself).</p>
|
||
<h5 id="panics-22"><a href="#panics-22">Panics</a></h5>
|
||
<p>Panics if <code>N > len</code>.</p>
|
||
<h5 id="examples-53"><a href="#examples-53">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(split_array)]
|
||
|
||
</span><span class="kw">let </span><span class="kw-2">mut </span>v = <span class="kw-2">&mut </span>[<span class="number">1</span>, <span class="number">0</span>, <span class="number">3</span>, <span class="number">0</span>, <span class="number">5</span>, <span class="number">6</span>][..];
|
||
<span class="kw">let </span>(left, right) = v.rsplit_array_mut::<<span class="number">4</span>>();
|
||
<span class="macro">assert_eq!</span>(left, [<span class="number">1</span>, <span class="number">0</span>]);
|
||
<span class="macro">assert_eq!</span>(right, <span class="kw-2">&mut </span>[<span class="number">3</span>, <span class="number">0</span>, <span class="number">5</span>, <span class="number">6</span>]);
|
||
left[<span class="number">1</span>] = <span class="number">2</span>;
|
||
right[<span class="number">1</span>] = <span class="number">4</span>;
|
||
<span class="macro">assert_eq!</span>(v, [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>]);</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.split" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.67.0/src/core/slice/mod.rs.html#1906-1908">source</a></span><h4 class="code-header">pub fn <a href="#method.split" class="fn">split</a><F>(&self, pred: F) -> <a class="struct" href="https://doc.rust-lang.org/1.67.0/core/slice/iter/struct.Split.html" title="struct core::slice::iter::Split">Split</a><'_, T, F><span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.reference.html">&</a>T) -> <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.bool.html">bool</a>,</span></h4></section></summary><div class="docblock"><p>Returns an iterator over subslices separated by elements that match
|
||
<code>pred</code>. The matched element is not contained in the subslices.</p>
|
||
<h5 id="examples-54"><a href="#examples-54">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>slice = [<span class="number">10</span>, <span class="number">40</span>, <span class="number">33</span>, <span class="number">20</span>];
|
||
<span class="kw">let </span><span class="kw-2">mut </span>iter = slice.split(|num| num % <span class="number">3 </span>== <span class="number">0</span>);
|
||
|
||
<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&</span>[<span class="number">10</span>, <span class="number">40</span>]);
|
||
<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&</span>[<span class="number">20</span>]);
|
||
<span class="macro">assert!</span>(iter.next().is_none());</code></pre></div>
|
||
<p>If the first element is matched, an empty slice will be the first item
|
||
returned by the iterator. Similarly, if the last element in the slice
|
||
is matched, an empty slice will be the last item returned by the
|
||
iterator:</p>
|
||
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>slice = [<span class="number">10</span>, <span class="number">40</span>, <span class="number">33</span>];
|
||
<span class="kw">let </span><span class="kw-2">mut </span>iter = slice.split(|num| num % <span class="number">3 </span>== <span class="number">0</span>);
|
||
|
||
<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&</span>[<span class="number">10</span>, <span class="number">40</span>]);
|
||
<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&</span>[]);
|
||
<span class="macro">assert!</span>(iter.next().is_none());</code></pre></div>
|
||
<p>If two matched elements are directly adjacent, an empty slice will be
|
||
present between them:</p>
|
||
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>slice = [<span class="number">10</span>, <span class="number">6</span>, <span class="number">33</span>, <span class="number">20</span>];
|
||
<span class="kw">let </span><span class="kw-2">mut </span>iter = slice.split(|num| num % <span class="number">3 </span>== <span class="number">0</span>);
|
||
|
||
<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&</span>[<span class="number">10</span>]);
|
||
<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&</span>[]);
|
||
<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&</span>[<span class="number">20</span>]);
|
||
<span class="macro">assert!</span>(iter.next().is_none());</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.split_mut" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.67.0/src/core/slice/mod.rs.html#1928-1930">source</a></span><h4 class="code-header">pub fn <a href="#method.split_mut" class="fn">split_mut</a><F>(&mut self, pred: F) -> <a class="struct" href="https://doc.rust-lang.org/1.67.0/core/slice/iter/struct.SplitMut.html" title="struct core::slice::iter::SplitMut">SplitMut</a><'_, T, F><span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.reference.html">&</a>T) -> <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.bool.html">bool</a>,</span></h4></section></summary><div class="docblock"><p>Returns an iterator over mutable subslices separated by elements that
|
||
match <code>pred</code>. The matched element is not contained in the subslices.</p>
|
||
<h5 id="examples-55"><a href="#examples-55">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>v = [<span class="number">10</span>, <span class="number">40</span>, <span class="number">30</span>, <span class="number">20</span>, <span class="number">60</span>, <span class="number">50</span>];
|
||
|
||
<span class="kw">for </span>group <span class="kw">in </span>v.split_mut(|num| <span class="kw-2">*</span>num % <span class="number">3 </span>== <span class="number">0</span>) {
|
||
group[<span class="number">0</span>] = <span class="number">1</span>;
|
||
}
|
||
<span class="macro">assert_eq!</span>(v, [<span class="number">1</span>, <span class="number">40</span>, <span class="number">30</span>, <span class="number">1</span>, <span class="number">60</span>, <span class="number">1</span>]);</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.split_inclusive" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.51.0">1.51.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.67.0/src/core/slice/mod.rs.html#1964-1966">source</a></span><h4 class="code-header">pub fn <a href="#method.split_inclusive" class="fn">split_inclusive</a><F>(&self, pred: F) -> <a class="struct" href="https://doc.rust-lang.org/1.67.0/core/slice/iter/struct.SplitInclusive.html" title="struct core::slice::iter::SplitInclusive">SplitInclusive</a><'_, T, F><span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.reference.html">&</a>T) -> <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.bool.html">bool</a>,</span></h4></section></summary><div class="docblock"><p>Returns an iterator over subslices separated by elements that match
|
||
<code>pred</code>. The matched element is contained in the end of the previous
|
||
subslice as a terminator.</p>
|
||
<h5 id="examples-56"><a href="#examples-56">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>slice = [<span class="number">10</span>, <span class="number">40</span>, <span class="number">33</span>, <span class="number">20</span>];
|
||
<span class="kw">let </span><span class="kw-2">mut </span>iter = slice.split_inclusive(|num| num % <span class="number">3 </span>== <span class="number">0</span>);
|
||
|
||
<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&</span>[<span class="number">10</span>, <span class="number">40</span>, <span class="number">33</span>]);
|
||
<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&</span>[<span class="number">20</span>]);
|
||
<span class="macro">assert!</span>(iter.next().is_none());</code></pre></div>
|
||
<p>If the last element of the slice is matched,
|
||
that element will be considered the terminator of the preceding slice.
|
||
That slice will be the last item returned by the iterator.</p>
|
||
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>slice = [<span class="number">3</span>, <span class="number">10</span>, <span class="number">40</span>, <span class="number">33</span>];
|
||
<span class="kw">let </span><span class="kw-2">mut </span>iter = slice.split_inclusive(|num| num % <span class="number">3 </span>== <span class="number">0</span>);
|
||
|
||
<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&</span>[<span class="number">3</span>]);
|
||
<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&</span>[<span class="number">10</span>, <span class="number">40</span>, <span class="number">33</span>]);
|
||
<span class="macro">assert!</span>(iter.next().is_none());</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.split_inclusive_mut" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.51.0">1.51.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.67.0/src/core/slice/mod.rs.html#1988-1990">source</a></span><h4 class="code-header">pub fn <a href="#method.split_inclusive_mut" class="fn">split_inclusive_mut</a><F>(&mut self, pred: F) -> <a class="struct" href="https://doc.rust-lang.org/1.67.0/core/slice/iter/struct.SplitInclusiveMut.html" title="struct core::slice::iter::SplitInclusiveMut">SplitInclusiveMut</a><'_, T, F><span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.reference.html">&</a>T) -> <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.bool.html">bool</a>,</span></h4></section></summary><div class="docblock"><p>Returns an iterator over mutable subslices separated by elements that
|
||
match <code>pred</code>. The matched element is contained in the previous
|
||
subslice as a terminator.</p>
|
||
<h5 id="examples-57"><a href="#examples-57">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>v = [<span class="number">10</span>, <span class="number">40</span>, <span class="number">30</span>, <span class="number">20</span>, <span class="number">60</span>, <span class="number">50</span>];
|
||
|
||
<span class="kw">for </span>group <span class="kw">in </span>v.split_inclusive_mut(|num| <span class="kw-2">*</span>num % <span class="number">3 </span>== <span class="number">0</span>) {
|
||
<span class="kw">let </span>terminator_idx = group.len()-<span class="number">1</span>;
|
||
group[terminator_idx] = <span class="number">1</span>;
|
||
}
|
||
<span class="macro">assert_eq!</span>(v, [<span class="number">10</span>, <span class="number">40</span>, <span class="number">1</span>, <span class="number">20</span>, <span class="number">1</span>, <span class="number">1</span>]);</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.rsplit" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.27.0">1.27.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.67.0/src/core/slice/mod.rs.html#2024-2026">source</a></span><h4 class="code-header">pub fn <a href="#method.rsplit" class="fn">rsplit</a><F>(&self, pred: F) -> <a class="struct" href="https://doc.rust-lang.org/1.67.0/core/slice/iter/struct.RSplit.html" title="struct core::slice::iter::RSplit">RSplit</a><'_, T, F><span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.reference.html">&</a>T) -> <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.bool.html">bool</a>,</span></h4></section></summary><div class="docblock"><p>Returns an iterator over subslices separated by elements that match
|
||
<code>pred</code>, starting at the end of the slice and working backwards.
|
||
The matched element is not contained in the subslices.</p>
|
||
<h5 id="examples-58"><a href="#examples-58">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>slice = [<span class="number">11</span>, <span class="number">22</span>, <span class="number">33</span>, <span class="number">0</span>, <span class="number">44</span>, <span class="number">55</span>];
|
||
<span class="kw">let </span><span class="kw-2">mut </span>iter = slice.rsplit(|num| <span class="kw-2">*</span>num == <span class="number">0</span>);
|
||
|
||
<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&</span>[<span class="number">44</span>, <span class="number">55</span>]);
|
||
<span class="macro">assert_eq!</span>(iter.next().unwrap(), <span class="kw-2">&</span>[<span class="number">11</span>, <span class="number">22</span>, <span class="number">33</span>]);
|
||
<span class="macro">assert_eq!</span>(iter.next(), <span class="prelude-val">None</span>);</code></pre></div>
|
||
<p>As with <code>split()</code>, if the first or last element is matched, an empty
|
||
slice will be the first (or last) item returned by the iterator.</p>
|
||
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>v = <span class="kw-2">&</span>[<span class="number">0</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">5</span>, <span class="number">8</span>];
|
||
<span class="kw">let </span><span class="kw-2">mut </span>it = v.rsplit(|n| <span class="kw-2">*</span>n % <span class="number">2 </span>== <span class="number">0</span>);
|
||
<span class="macro">assert_eq!</span>(it.next().unwrap(), <span class="kw-2">&</span>[]);
|
||
<span class="macro">assert_eq!</span>(it.next().unwrap(), <span class="kw-2">&</span>[<span class="number">3</span>, <span class="number">5</span>]);
|
||
<span class="macro">assert_eq!</span>(it.next().unwrap(), <span class="kw-2">&</span>[<span class="number">1</span>, <span class="number">1</span>]);
|
||
<span class="macro">assert_eq!</span>(it.next().unwrap(), <span class="kw-2">&</span>[]);
|
||
<span class="macro">assert_eq!</span>(it.next(), <span class="prelude-val">None</span>);</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.rsplit_mut" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.27.0">1.27.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.67.0/src/core/slice/mod.rs.html#2050-2052">source</a></span><h4 class="code-header">pub fn <a href="#method.rsplit_mut" class="fn">rsplit_mut</a><F>(&mut self, pred: F) -> <a class="struct" href="https://doc.rust-lang.org/1.67.0/core/slice/iter/struct.RSplitMut.html" title="struct core::slice::iter::RSplitMut">RSplitMut</a><'_, T, F><span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.reference.html">&</a>T) -> <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.bool.html">bool</a>,</span></h4></section></summary><div class="docblock"><p>Returns an iterator over mutable subslices separated by elements that
|
||
match <code>pred</code>, starting at the end of the slice and working
|
||
backwards. The matched element is not contained in the subslices.</p>
|
||
<h5 id="examples-59"><a href="#examples-59">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>v = [<span class="number">100</span>, <span class="number">400</span>, <span class="number">300</span>, <span class="number">200</span>, <span class="number">600</span>, <span class="number">500</span>];
|
||
|
||
<span class="kw">let </span><span class="kw-2">mut </span>count = <span class="number">0</span>;
|
||
<span class="kw">for </span>group <span class="kw">in </span>v.rsplit_mut(|num| <span class="kw-2">*</span>num % <span class="number">3 </span>== <span class="number">0</span>) {
|
||
count += <span class="number">1</span>;
|
||
group[<span class="number">0</span>] = count;
|
||
}
|
||
<span class="macro">assert_eq!</span>(v, [<span class="number">3</span>, <span class="number">400</span>, <span class="number">300</span>, <span class="number">2</span>, <span class="number">600</span>, <span class="number">1</span>]);</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.splitn" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.67.0/src/core/slice/mod.rs.html#2078-2080">source</a></span><h4 class="code-header">pub fn <a href="#method.splitn" class="fn">splitn</a><F>(&self, n: <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.usize.html">usize</a>, pred: F) -> <a class="struct" href="https://doc.rust-lang.org/1.67.0/core/slice/iter/struct.SplitN.html" title="struct core::slice::iter::SplitN">SplitN</a><'_, T, F><span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.reference.html">&</a>T) -> <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.bool.html">bool</a>,</span></h4></section></summary><div class="docblock"><p>Returns an iterator over subslices separated by elements that match
|
||
<code>pred</code>, limited to returning at most <code>n</code> items. The matched element is
|
||
not contained in the subslices.</p>
|
||
<p>The last element returned, if any, will contain the remainder of the
|
||
slice.</p>
|
||
<h5 id="examples-60"><a href="#examples-60">Examples</a></h5>
|
||
<p>Print the slice split once by numbers divisible by 3 (i.e., <code>[10, 40]</code>,
|
||
<code>[20, 60, 50]</code>):</p>
|
||
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>v = [<span class="number">10</span>, <span class="number">40</span>, <span class="number">30</span>, <span class="number">20</span>, <span class="number">60</span>, <span class="number">50</span>];
|
||
|
||
<span class="kw">for </span>group <span class="kw">in </span>v.splitn(<span class="number">2</span>, |num| <span class="kw-2">*</span>num % <span class="number">3 </span>== <span class="number">0</span>) {
|
||
<span class="macro">println!</span>(<span class="string">"{group:?}"</span>);
|
||
}</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.splitn_mut" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.67.0/src/core/slice/mod.rs.html#2104-2106">source</a></span><h4 class="code-header">pub fn <a href="#method.splitn_mut" class="fn">splitn_mut</a><F>(&mut self, n: <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.usize.html">usize</a>, pred: F) -> <a class="struct" href="https://doc.rust-lang.org/1.67.0/core/slice/iter/struct.SplitNMut.html" title="struct core::slice::iter::SplitNMut">SplitNMut</a><'_, T, F><span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.reference.html">&</a>T) -> <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.bool.html">bool</a>,</span></h4></section></summary><div class="docblock"><p>Returns an iterator over mutable subslices separated by elements that match
|
||
<code>pred</code>, limited to returning at most <code>n</code> items. The matched element is
|
||
not contained in the subslices.</p>
|
||
<p>The last element returned, if any, will contain the remainder of the
|
||
slice.</p>
|
||
<h5 id="examples-61"><a href="#examples-61">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>v = [<span class="number">10</span>, <span class="number">40</span>, <span class="number">30</span>, <span class="number">20</span>, <span class="number">60</span>, <span class="number">50</span>];
|
||
|
||
<span class="kw">for </span>group <span class="kw">in </span>v.splitn_mut(<span class="number">2</span>, |num| <span class="kw-2">*</span>num % <span class="number">3 </span>== <span class="number">0</span>) {
|
||
group[<span class="number">0</span>] = <span class="number">1</span>;
|
||
}
|
||
<span class="macro">assert_eq!</span>(v, [<span class="number">1</span>, <span class="number">40</span>, <span class="number">30</span>, <span class="number">1</span>, <span class="number">60</span>, <span class="number">50</span>]);</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.rsplitn" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.67.0/src/core/slice/mod.rs.html#2133-2135">source</a></span><h4 class="code-header">pub fn <a href="#method.rsplitn" class="fn">rsplitn</a><F>(&self, n: <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.usize.html">usize</a>, pred: F) -> <a class="struct" href="https://doc.rust-lang.org/1.67.0/core/slice/iter/struct.RSplitN.html" title="struct core::slice::iter::RSplitN">RSplitN</a><'_, T, F><span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.reference.html">&</a>T) -> <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.bool.html">bool</a>,</span></h4></section></summary><div class="docblock"><p>Returns an iterator over subslices separated by elements that match
|
||
<code>pred</code> limited to returning at most <code>n</code> items. This starts at the end of
|
||
the slice and works backwards. The matched element is not contained in
|
||
the subslices.</p>
|
||
<p>The last element returned, if any, will contain the remainder of the
|
||
slice.</p>
|
||
<h5 id="examples-62"><a href="#examples-62">Examples</a></h5>
|
||
<p>Print the slice split once, starting from the end, by numbers divisible
|
||
by 3 (i.e., <code>[50]</code>, <code>[10, 40, 30, 20]</code>):</p>
|
||
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>v = [<span class="number">10</span>, <span class="number">40</span>, <span class="number">30</span>, <span class="number">20</span>, <span class="number">60</span>, <span class="number">50</span>];
|
||
|
||
<span class="kw">for </span>group <span class="kw">in </span>v.rsplitn(<span class="number">2</span>, |num| <span class="kw-2">*</span>num % <span class="number">3 </span>== <span class="number">0</span>) {
|
||
<span class="macro">println!</span>(<span class="string">"{group:?}"</span>);
|
||
}</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.rsplitn_mut" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.67.0/src/core/slice/mod.rs.html#2160-2162">source</a></span><h4 class="code-header">pub fn <a href="#method.rsplitn_mut" class="fn">rsplitn_mut</a><F>(&mut self, n: <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.usize.html">usize</a>, pred: F) -> <a class="struct" href="https://doc.rust-lang.org/1.67.0/core/slice/iter/struct.RSplitNMut.html" title="struct core::slice::iter::RSplitNMut">RSplitNMut</a><'_, T, F><span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.reference.html">&</a>T) -> <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.bool.html">bool</a>,</span></h4></section></summary><div class="docblock"><p>Returns an iterator over subslices separated by elements that match
|
||
<code>pred</code> limited to returning at most <code>n</code> items. This starts at the end of
|
||
the slice and works backwards. The matched element is not contained in
|
||
the subslices.</p>
|
||
<p>The last element returned, if any, will contain the remainder of the
|
||
slice.</p>
|
||
<h5 id="examples-63"><a href="#examples-63">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>s = [<span class="number">10</span>, <span class="number">40</span>, <span class="number">30</span>, <span class="number">20</span>, <span class="number">60</span>, <span class="number">50</span>];
|
||
|
||
<span class="kw">for </span>group <span class="kw">in </span>s.rsplitn_mut(<span class="number">2</span>, |num| <span class="kw-2">*</span>num % <span class="number">3 </span>== <span class="number">0</span>) {
|
||
group[<span class="number">0</span>] = <span class="number">1</span>;
|
||
}
|
||
<span class="macro">assert_eq!</span>(s, [<span class="number">1</span>, <span class="number">40</span>, <span class="number">30</span>, <span class="number">20</span>, <span class="number">60</span>, <span class="number">1</span>]);</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.contains" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.67.0/src/core/slice/mod.rs.html#2195-2197">source</a></span><h4 class="code-header">pub fn <a href="#method.contains" class="fn">contains</a>(&self, x: <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.reference.html">&</a>T) -> <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.bool.html">bool</a><span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><T>,</span></h4></section></summary><div class="docblock"><p>Returns <code>true</code> if the slice contains an element with the given value.</p>
|
||
<p>This operation is <em>O</em>(<em>n</em>).</p>
|
||
<p>Note that if you have a sorted slice, <a href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html#method.binary_search"><code>binary_search</code></a> may be faster.</p>
|
||
<h5 id="examples-64"><a href="#examples-64">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>v = [<span class="number">10</span>, <span class="number">40</span>, <span class="number">30</span>];
|
||
<span class="macro">assert!</span>(v.contains(<span class="kw-2">&</span><span class="number">30</span>));
|
||
<span class="macro">assert!</span>(!v.contains(<span class="kw-2">&</span><span class="number">50</span>));</code></pre></div>
|
||
<p>If you do not have a <code>&T</code>, but some other value that you can compare
|
||
with one (for example, <code>String</code> implements <code>PartialEq<str></code>), you can
|
||
use <code>iter().any</code>:</p>
|
||
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>v = [String::from(<span class="string">"hello"</span>), String::from(<span class="string">"world"</span>)]; <span class="comment">// slice of `String`
|
||
</span><span class="macro">assert!</span>(v.iter().any(|e| e == <span class="string">"hello"</span>)); <span class="comment">// search with `&str`
|
||
</span><span class="macro">assert!</span>(!v.iter().any(|e| e == <span class="string">"hi"</span>));</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.starts_with" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.67.0/src/core/slice/mod.rs.html#2224-2226">source</a></span><h4 class="code-header">pub fn <a href="#method.starts_with" class="fn">starts_with</a>(&self, needle: &<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html">[T]</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.bool.html">bool</a><span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><T>,</span></h4></section></summary><div class="docblock"><p>Returns <code>true</code> if <code>needle</code> is a prefix of the slice.</p>
|
||
<h5 id="examples-65"><a href="#examples-65">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>v = [<span class="number">10</span>, <span class="number">40</span>, <span class="number">30</span>];
|
||
<span class="macro">assert!</span>(v.starts_with(<span class="kw-2">&</span>[<span class="number">10</span>]));
|
||
<span class="macro">assert!</span>(v.starts_with(<span class="kw-2">&</span>[<span class="number">10</span>, <span class="number">40</span>]));
|
||
<span class="macro">assert!</span>(!v.starts_with(<span class="kw-2">&</span>[<span class="number">50</span>]));
|
||
<span class="macro">assert!</span>(!v.starts_with(<span class="kw-2">&</span>[<span class="number">10</span>, <span class="number">50</span>]));</code></pre></div>
|
||
<p>Always returns <code>true</code> if <code>needle</code> is an empty slice:</p>
|
||
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>v = <span class="kw-2">&</span>[<span class="number">10</span>, <span class="number">40</span>, <span class="number">30</span>];
|
||
<span class="macro">assert!</span>(v.starts_with(<span class="kw-2">&</span>[]));
|
||
<span class="kw">let </span>v: <span class="kw-2">&</span>[u8] = <span class="kw-2">&</span>[];
|
||
<span class="macro">assert!</span>(v.starts_with(<span class="kw-2">&</span>[]));</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.ends_with" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.67.0/src/core/slice/mod.rs.html#2254-2256">source</a></span><h4 class="code-header">pub fn <a href="#method.ends_with" class="fn">ends_with</a>(&self, needle: &<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html">[T]</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.bool.html">bool</a><span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><T>,</span></h4></section></summary><div class="docblock"><p>Returns <code>true</code> if <code>needle</code> is a suffix of the slice.</p>
|
||
<h5 id="examples-66"><a href="#examples-66">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>v = [<span class="number">10</span>, <span class="number">40</span>, <span class="number">30</span>];
|
||
<span class="macro">assert!</span>(v.ends_with(<span class="kw-2">&</span>[<span class="number">30</span>]));
|
||
<span class="macro">assert!</span>(v.ends_with(<span class="kw-2">&</span>[<span class="number">40</span>, <span class="number">30</span>]));
|
||
<span class="macro">assert!</span>(!v.ends_with(<span class="kw-2">&</span>[<span class="number">50</span>]));
|
||
<span class="macro">assert!</span>(!v.ends_with(<span class="kw-2">&</span>[<span class="number">50</span>, <span class="number">30</span>]));</code></pre></div>
|
||
<p>Always returns <code>true</code> if <code>needle</code> is an empty slice:</p>
|
||
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>v = <span class="kw-2">&</span>[<span class="number">10</span>, <span class="number">40</span>, <span class="number">30</span>];
|
||
<span class="macro">assert!</span>(v.ends_with(<span class="kw-2">&</span>[]));
|
||
<span class="kw">let </span>v: <span class="kw-2">&</span>[u8] = <span class="kw-2">&</span>[];
|
||
<span class="macro">assert!</span>(v.ends_with(<span class="kw-2">&</span>[]));</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.strip_prefix" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.51.0">1.51.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.67.0/src/core/slice/mod.rs.html#2284-2286">source</a></span><h4 class="code-header">pub fn <a href="#method.strip_prefix" class="fn">strip_prefix</a><P>(&self, prefix: <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.reference.html">&</a>P) -> <a class="enum" href="https://doc.rust-lang.org/1.67.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html">[T]</a>><span class="where fmt-newline">where<br> P: <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/slice/trait.SlicePattern.html" title="trait core::slice::SlicePattern">SlicePattern</a><Item = T> + ?<a class="trait" href="https://doc.rust-lang.org/1.67.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> T: <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><T>,</span></h4></section></summary><div class="docblock"><p>Returns a subslice with the prefix removed.</p>
|
||
<p>If the slice starts with <code>prefix</code>, returns the subslice after the prefix, wrapped in <code>Some</code>.
|
||
If <code>prefix</code> is empty, simply returns the original slice.</p>
|
||
<p>If the slice does not start with <code>prefix</code>, returns <code>None</code>.</p>
|
||
<h5 id="examples-67"><a href="#examples-67">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>v = <span class="kw-2">&</span>[<span class="number">10</span>, <span class="number">40</span>, <span class="number">30</span>];
|
||
<span class="macro">assert_eq!</span>(v.strip_prefix(<span class="kw-2">&</span>[<span class="number">10</span>]), <span class="prelude-val">Some</span>(<span class="kw-2">&</span>[<span class="number">40</span>, <span class="number">30</span>][..]));
|
||
<span class="macro">assert_eq!</span>(v.strip_prefix(<span class="kw-2">&</span>[<span class="number">10</span>, <span class="number">40</span>]), <span class="prelude-val">Some</span>(<span class="kw-2">&</span>[<span class="number">30</span>][..]));
|
||
<span class="macro">assert_eq!</span>(v.strip_prefix(<span class="kw-2">&</span>[<span class="number">50</span>]), <span class="prelude-val">None</span>);
|
||
<span class="macro">assert_eq!</span>(v.strip_prefix(<span class="kw-2">&</span>[<span class="number">10</span>, <span class="number">50</span>]), <span class="prelude-val">None</span>);
|
||
|
||
<span class="kw">let </span>prefix : <span class="kw-2">&</span>str = <span class="string">"he"</span>;
|
||
<span class="macro">assert_eq!</span>(<span class="string">b"hello"</span>.strip_prefix(prefix.as_bytes()),
|
||
<span class="prelude-val">Some</span>(<span class="string">b"llo"</span>.as_ref()));</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.strip_suffix" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.51.0">1.51.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.67.0/src/core/slice/mod.rs.html#2318-2320">source</a></span><h4 class="code-header">pub fn <a href="#method.strip_suffix" class="fn">strip_suffix</a><P>(&self, suffix: <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.reference.html">&</a>P) -> <a class="enum" href="https://doc.rust-lang.org/1.67.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html">[T]</a>><span class="where fmt-newline">where<br> P: <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/slice/trait.SlicePattern.html" title="trait core::slice::SlicePattern">SlicePattern</a><Item = T> + ?<a class="trait" href="https://doc.rust-lang.org/1.67.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> T: <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><T>,</span></h4></section></summary><div class="docblock"><p>Returns a subslice with the suffix removed.</p>
|
||
<p>If the slice ends with <code>suffix</code>, returns the subslice before the suffix, wrapped in <code>Some</code>.
|
||
If <code>suffix</code> is empty, simply returns the original slice.</p>
|
||
<p>If the slice does not end with <code>suffix</code>, returns <code>None</code>.</p>
|
||
<h5 id="examples-68"><a href="#examples-68">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>v = <span class="kw-2">&</span>[<span class="number">10</span>, <span class="number">40</span>, <span class="number">30</span>];
|
||
<span class="macro">assert_eq!</span>(v.strip_suffix(<span class="kw-2">&</span>[<span class="number">30</span>]), <span class="prelude-val">Some</span>(<span class="kw-2">&</span>[<span class="number">10</span>, <span class="number">40</span>][..]));
|
||
<span class="macro">assert_eq!</span>(v.strip_suffix(<span class="kw-2">&</span>[<span class="number">40</span>, <span class="number">30</span>]), <span class="prelude-val">Some</span>(<span class="kw-2">&</span>[<span class="number">10</span>][..]));
|
||
<span class="macro">assert_eq!</span>(v.strip_suffix(<span class="kw-2">&</span>[<span class="number">50</span>]), <span class="prelude-val">None</span>);
|
||
<span class="macro">assert_eq!</span>(v.strip_suffix(<span class="kw-2">&</span>[<span class="number">50</span>, <span class="number">30</span>]), <span class="prelude-val">None</span>);</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.binary_search" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.67.0/src/core/slice/mod.rs.html#2402-2404">source</a></span><h4 class="code-header">pub fn <a href="#method.binary_search" class="fn">binary_search</a>(&self, x: <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.reference.html">&</a>T) -> <a class="enum" href="https://doc.rust-lang.org/1.67.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.usize.html">usize</a>, <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.usize.html">usize</a>><span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a>,</span></h4></section></summary><div class="docblock"><p>Binary searches this slice for a given element.
|
||
This behaves similarly to <a href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html#method.contains"><code>contains</code></a> if this slice is sorted.</p>
|
||
<p>If the value is found then <a href="https://doc.rust-lang.org/1.67.0/core/result/enum.Result.html#variant.Ok" title="Result::Ok"><code>Result::Ok</code></a> is returned, containing the
|
||
index of the matching element. If there are multiple matches, then any
|
||
one of the matches could be returned. The index is chosen
|
||
deterministically, but is subject to change in future versions of Rust.
|
||
If the value is not found then <a href="https://doc.rust-lang.org/1.67.0/core/result/enum.Result.html#variant.Err" title="Result::Err"><code>Result::Err</code></a> is returned, containing
|
||
the index where a matching element could be inserted while maintaining
|
||
sorted order.</p>
|
||
<p>See also <a href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html#method.binary_search_by"><code>binary_search_by</code></a>, <a href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html#method.binary_search_by_key"><code>binary_search_by_key</code></a>, and <a href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html#method.partition_point"><code>partition_point</code></a>.</p>
|
||
<h5 id="examples-69"><a href="#examples-69">Examples</a></h5>
|
||
<p>Looks up a series of four elements. The first is found, with a
|
||
uniquely determined position; the second and third are not
|
||
found; the fourth could match any position in <code>[1, 4]</code>.</p>
|
||
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>s = [<span class="number">0</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">5</span>, <span class="number">8</span>, <span class="number">13</span>, <span class="number">21</span>, <span class="number">34</span>, <span class="number">55</span>];
|
||
|
||
<span class="macro">assert_eq!</span>(s.binary_search(<span class="kw-2">&</span><span class="number">13</span>), <span class="prelude-val">Ok</span>(<span class="number">9</span>));
|
||
<span class="macro">assert_eq!</span>(s.binary_search(<span class="kw-2">&</span><span class="number">4</span>), <span class="prelude-val">Err</span>(<span class="number">7</span>));
|
||
<span class="macro">assert_eq!</span>(s.binary_search(<span class="kw-2">&</span><span class="number">100</span>), <span class="prelude-val">Err</span>(<span class="number">13</span>));
|
||
<span class="kw">let </span>r = s.binary_search(<span class="kw-2">&</span><span class="number">1</span>);
|
||
<span class="macro">assert!</span>(<span class="kw">match </span>r { <span class="prelude-val">Ok</span>(<span class="number">1</span>..=<span class="number">4</span>) => <span class="bool-val">true</span>, <span class="kw">_ </span>=> <span class="bool-val">false</span>, });</code></pre></div>
|
||
<p>If you want to find that whole <em>range</em> of matching items, rather than
|
||
an arbitrary matching one, that can be done using <a href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html#method.partition_point"><code>partition_point</code></a>:</p>
|
||
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>s = [<span class="number">0</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">5</span>, <span class="number">8</span>, <span class="number">13</span>, <span class="number">21</span>, <span class="number">34</span>, <span class="number">55</span>];
|
||
|
||
<span class="kw">let </span>low = s.partition_point(|x| x < <span class="kw-2">&</span><span class="number">1</span>);
|
||
<span class="macro">assert_eq!</span>(low, <span class="number">1</span>);
|
||
<span class="kw">let </span>high = s.partition_point(|x| x <= <span class="kw-2">&</span><span class="number">1</span>);
|
||
<span class="macro">assert_eq!</span>(high, <span class="number">5</span>);
|
||
<span class="kw">let </span>r = s.binary_search(<span class="kw-2">&</span><span class="number">1</span>);
|
||
<span class="macro">assert!</span>((low..high).contains(<span class="kw-2">&</span>r.unwrap()));
|
||
|
||
<span class="macro">assert!</span>(s[..low].iter().all(|<span class="kw-2">&</span>x| x < <span class="number">1</span>));
|
||
<span class="macro">assert!</span>(s[low..high].iter().all(|<span class="kw-2">&</span>x| x == <span class="number">1</span>));
|
||
<span class="macro">assert!</span>(s[high..].iter().all(|<span class="kw-2">&</span>x| x > <span class="number">1</span>));
|
||
|
||
<span class="comment">// For something not found, the "range" of equal items is empty
|
||
</span><span class="macro">assert_eq!</span>(s.partition_point(|x| x < <span class="kw-2">&</span><span class="number">11</span>), <span class="number">9</span>);
|
||
<span class="macro">assert_eq!</span>(s.partition_point(|x| x <= <span class="kw-2">&</span><span class="number">11</span>), <span class="number">9</span>);
|
||
<span class="macro">assert_eq!</span>(s.binary_search(<span class="kw-2">&</span><span class="number">11</span>), <span class="prelude-val">Err</span>(<span class="number">9</span>));</code></pre></div>
|
||
<p>If you want to insert an item to a sorted vector, while maintaining
|
||
sort order, consider using <a href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html#method.partition_point"><code>partition_point</code></a>:</p>
|
||
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>s = <span class="macro">vec!</span>[<span class="number">0</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">5</span>, <span class="number">8</span>, <span class="number">13</span>, <span class="number">21</span>, <span class="number">34</span>, <span class="number">55</span>];
|
||
<span class="kw">let </span>num = <span class="number">42</span>;
|
||
<span class="kw">let </span>idx = s.partition_point(|<span class="kw-2">&</span>x| x < num);
|
||
<span class="comment">// The above is equivalent to `let idx = s.binary_search(&num).unwrap_or_else(|x| x);`
|
||
</span>s.insert(idx, num);
|
||
<span class="macro">assert_eq!</span>(s, [<span class="number">0</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">5</span>, <span class="number">8</span>, <span class="number">13</span>, <span class="number">21</span>, <span class="number">34</span>, <span class="number">42</span>, <span class="number">55</span>]);</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.binary_search_by" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.67.0/src/core/slice/mod.rs.html#2453-2455">source</a></span><h4 class="code-header">pub fn <a href="#method.binary_search_by" class="fn">binary_search_by</a><'a, F>(&'a self, f: F) -> <a class="enum" href="https://doc.rust-lang.org/1.67.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.usize.html">usize</a>, <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.usize.html">usize</a>><span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.reference.html">&'a </a>T) -> <a class="enum" href="https://doc.rust-lang.org/1.67.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>,</span></h4></section></summary><div class="docblock"><p>Binary searches this slice with a comparator function.
|
||
This behaves similarly to <a href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html#method.contains"><code>contains</code></a> if this slice is sorted.</p>
|
||
<p>The comparator function should implement an order consistent
|
||
with the sort order of the underlying slice, returning an
|
||
order code that indicates whether its argument is <code>Less</code>,
|
||
<code>Equal</code> or <code>Greater</code> the desired target.</p>
|
||
<p>If the value is found then <a href="https://doc.rust-lang.org/1.67.0/core/result/enum.Result.html#variant.Ok" title="Result::Ok"><code>Result::Ok</code></a> is returned, containing the
|
||
index of the matching element. If there are multiple matches, then any
|
||
one of the matches could be returned. The index is chosen
|
||
deterministically, but is subject to change in future versions of Rust.
|
||
If the value is not found then <a href="https://doc.rust-lang.org/1.67.0/core/result/enum.Result.html#variant.Err" title="Result::Err"><code>Result::Err</code></a> is returned, containing
|
||
the index where a matching element could be inserted while maintaining
|
||
sorted order.</p>
|
||
<p>See also <a href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html#method.binary_search"><code>binary_search</code></a>, <a href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html#method.binary_search_by_key"><code>binary_search_by_key</code></a>, and <a href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html#method.partition_point"><code>partition_point</code></a>.</p>
|
||
<h5 id="examples-70"><a href="#examples-70">Examples</a></h5>
|
||
<p>Looks up a series of four elements. The first is found, with a
|
||
uniquely determined position; the second and third are not
|
||
found; the fourth could match any position in <code>[1, 4]</code>.</p>
|
||
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>s = [<span class="number">0</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">5</span>, <span class="number">8</span>, <span class="number">13</span>, <span class="number">21</span>, <span class="number">34</span>, <span class="number">55</span>];
|
||
|
||
<span class="kw">let </span>seek = <span class="number">13</span>;
|
||
<span class="macro">assert_eq!</span>(s.binary_search_by(|probe| probe.cmp(<span class="kw-2">&</span>seek)), <span class="prelude-val">Ok</span>(<span class="number">9</span>));
|
||
<span class="kw">let </span>seek = <span class="number">4</span>;
|
||
<span class="macro">assert_eq!</span>(s.binary_search_by(|probe| probe.cmp(<span class="kw-2">&</span>seek)), <span class="prelude-val">Err</span>(<span class="number">7</span>));
|
||
<span class="kw">let </span>seek = <span class="number">100</span>;
|
||
<span class="macro">assert_eq!</span>(s.binary_search_by(|probe| probe.cmp(<span class="kw-2">&</span>seek)), <span class="prelude-val">Err</span>(<span class="number">13</span>));
|
||
<span class="kw">let </span>seek = <span class="number">1</span>;
|
||
<span class="kw">let </span>r = s.binary_search_by(|probe| probe.cmp(<span class="kw-2">&</span>seek));
|
||
<span class="macro">assert!</span>(<span class="kw">match </span>r { <span class="prelude-val">Ok</span>(<span class="number">1</span>..=<span class="number">4</span>) => <span class="bool-val">true</span>, <span class="kw">_ </span>=> <span class="bool-val">false</span>, });</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.binary_search_by_key" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.10.0">1.10.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.67.0/src/core/slice/mod.rs.html#2542-2545">source</a></span><h4 class="code-header">pub fn <a href="#method.binary_search_by_key" class="fn">binary_search_by_key</a><'a, B, F>(<br> &'a self,<br> b: <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.reference.html">&</a>B,<br> f: F<br>) -> <a class="enum" href="https://doc.rust-lang.org/1.67.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.usize.html">usize</a>, <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.usize.html">usize</a>><span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.reference.html">&'a </a>T) -> B,<br> B: <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a>,</span></h4></section></summary><div class="docblock"><p>Binary searches this slice with a key extraction function.
|
||
This behaves similarly to <a href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html#method.contains"><code>contains</code></a> if this slice is sorted.</p>
|
||
<p>Assumes that the slice is sorted by the key, for instance with
|
||
<a href="slice::sort_by_key"><code>sort_by_key</code></a> using the same key extraction function.</p>
|
||
<p>If the value is found then <a href="https://doc.rust-lang.org/1.67.0/core/result/enum.Result.html#variant.Ok" title="Result::Ok"><code>Result::Ok</code></a> is returned, containing the
|
||
index of the matching element. If there are multiple matches, then any
|
||
one of the matches could be returned. The index is chosen
|
||
deterministically, but is subject to change in future versions of Rust.
|
||
If the value is not found then <a href="https://doc.rust-lang.org/1.67.0/core/result/enum.Result.html#variant.Err" title="Result::Err"><code>Result::Err</code></a> is returned, containing
|
||
the index where a matching element could be inserted while maintaining
|
||
sorted order.</p>
|
||
<p>See also <a href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html#method.binary_search"><code>binary_search</code></a>, <a href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html#method.binary_search_by"><code>binary_search_by</code></a>, and <a href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html#method.partition_point"><code>partition_point</code></a>.</p>
|
||
<h5 id="examples-71"><a href="#examples-71">Examples</a></h5>
|
||
<p>Looks up a series of four elements in a slice of pairs sorted by
|
||
their second elements. The first is found, with a uniquely
|
||
determined position; the second and third are not found; the
|
||
fourth could match any position in <code>[1, 4]</code>.</p>
|
||
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>s = [(<span class="number">0</span>, <span class="number">0</span>), (<span class="number">2</span>, <span class="number">1</span>), (<span class="number">4</span>, <span class="number">1</span>), (<span class="number">5</span>, <span class="number">1</span>), (<span class="number">3</span>, <span class="number">1</span>),
|
||
(<span class="number">1</span>, <span class="number">2</span>), (<span class="number">2</span>, <span class="number">3</span>), (<span class="number">4</span>, <span class="number">5</span>), (<span class="number">5</span>, <span class="number">8</span>), (<span class="number">3</span>, <span class="number">13</span>),
|
||
(<span class="number">1</span>, <span class="number">21</span>), (<span class="number">2</span>, <span class="number">34</span>), (<span class="number">4</span>, <span class="number">55</span>)];
|
||
|
||
<span class="macro">assert_eq!</span>(s.binary_search_by_key(<span class="kw-2">&</span><span class="number">13</span>, |<span class="kw-2">&</span>(a, b)| b), <span class="prelude-val">Ok</span>(<span class="number">9</span>));
|
||
<span class="macro">assert_eq!</span>(s.binary_search_by_key(<span class="kw-2">&</span><span class="number">4</span>, |<span class="kw-2">&</span>(a, b)| b), <span class="prelude-val">Err</span>(<span class="number">7</span>));
|
||
<span class="macro">assert_eq!</span>(s.binary_search_by_key(<span class="kw-2">&</span><span class="number">100</span>, |<span class="kw-2">&</span>(a, b)| b), <span class="prelude-val">Err</span>(<span class="number">13</span>));
|
||
<span class="kw">let </span>r = s.binary_search_by_key(<span class="kw-2">&</span><span class="number">1</span>, |<span class="kw-2">&</span>(a, b)| b);
|
||
<span class="macro">assert!</span>(<span class="kw">match </span>r { <span class="prelude-val">Ok</span>(<span class="number">1</span>..=<span class="number">4</span>) => <span class="bool-val">true</span>, <span class="kw">_ </span>=> <span class="bool-val">false</span>, });</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sort_unstable" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.20.0">1.20.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.67.0/src/core/slice/mod.rs.html#2578-2580">source</a></span><h4 class="code-header">pub fn <a href="#method.sort_unstable" class="fn">sort_unstable</a>(&mut self)<span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a>,</span></h4></section></summary><div class="docblock"><p>Sorts the slice, but might not preserve the order of equal elements.</p>
|
||
<p>This sort is unstable (i.e., may reorder equal elements), in-place
|
||
(i.e., does not allocate), and <em>O</em>(<em>n</em> * log(<em>n</em>)) worst-case.</p>
|
||
<h5 id="current-implementation-1"><a href="#current-implementation-1">Current implementation</a></h5>
|
||
<p>The current algorithm is based on <a href="https://github.com/orlp/pdqsort">pattern-defeating quicksort</a> by Orson Peters,
|
||
which combines the fast average case of randomized quicksort with the fast worst case of
|
||
heapsort, while achieving linear time on slices with certain patterns. It uses some
|
||
randomization to avoid degenerate cases, but with a fixed seed to always provide
|
||
deterministic behavior.</p>
|
||
<p>It is typically faster than stable sorting, except in a few special cases, e.g., when the
|
||
slice consists of several concatenated sorted sequences.</p>
|
||
<h5 id="examples-72"><a href="#examples-72">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>v = [-<span class="number">5</span>, <span class="number">4</span>, <span class="number">1</span>, -<span class="number">3</span>, <span class="number">2</span>];
|
||
|
||
v.sort_unstable();
|
||
<span class="macro">assert!</span>(v == [-<span class="number">5</span>, -<span class="number">3</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">4</span>]);</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sort_unstable_by" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.20.0">1.20.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.67.0/src/core/slice/mod.rs.html#2633-2635">source</a></span><h4 class="code-header">pub fn <a href="#method.sort_unstable_by" class="fn">sort_unstable_by</a><F>(&mut self, compare: F)<span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.reference.html">&</a>T, <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.reference.html">&</a>T) -> <a class="enum" href="https://doc.rust-lang.org/1.67.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>,</span></h4></section></summary><div class="docblock"><p>Sorts the slice with a comparator function, but might not preserve the order of equal
|
||
elements.</p>
|
||
<p>This sort is unstable (i.e., may reorder equal elements), in-place
|
||
(i.e., does not allocate), and <em>O</em>(<em>n</em> * log(<em>n</em>)) worst-case.</p>
|
||
<p>The comparator function must define a total ordering for the elements in the slice. If
|
||
the ordering is not total, the order of the elements is unspecified. An order is a
|
||
total order if it is (for all <code>a</code>, <code>b</code> and <code>c</code>):</p>
|
||
<ul>
|
||
<li>total and antisymmetric: exactly one of <code>a < b</code>, <code>a == b</code> or <code>a > b</code> is true, and</li>
|
||
<li>transitive, <code>a < b</code> and <code>b < c</code> implies <code>a < c</code>. The same must hold for both <code>==</code> and <code>></code>.</li>
|
||
</ul>
|
||
<p>For example, while <a href="https://doc.rust-lang.org/1.67.0/core/primitive.f64.html" title="f64"><code>f64</code></a> doesn’t implement <a href="https://doc.rust-lang.org/1.67.0/core/cmp/trait.Ord.html" title="Ord"><code>Ord</code></a> because <code>NaN != NaN</code>, we can use
|
||
<code>partial_cmp</code> as our sort function when we know the slice doesn’t contain a <code>NaN</code>.</p>
|
||
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>floats = [<span class="number">5f64</span>, <span class="number">4.0</span>, <span class="number">1.0</span>, <span class="number">3.0</span>, <span class="number">2.0</span>];
|
||
floats.sort_unstable_by(|a, b| a.partial_cmp(b).unwrap());
|
||
<span class="macro">assert_eq!</span>(floats, [<span class="number">1.0</span>, <span class="number">2.0</span>, <span class="number">3.0</span>, <span class="number">4.0</span>, <span class="number">5.0</span>]);</code></pre></div>
|
||
<h5 id="current-implementation-2"><a href="#current-implementation-2">Current implementation</a></h5>
|
||
<p>The current algorithm is based on <a href="https://github.com/orlp/pdqsort">pattern-defeating quicksort</a> by Orson Peters,
|
||
which combines the fast average case of randomized quicksort with the fast worst case of
|
||
heapsort, while achieving linear time on slices with certain patterns. It uses some
|
||
randomization to avoid degenerate cases, but with a fixed seed to always provide
|
||
deterministic behavior.</p>
|
||
<p>It is typically faster than stable sorting, except in a few special cases, e.g., when the
|
||
slice consists of several concatenated sorted sequences.</p>
|
||
<h5 id="examples-73"><a href="#examples-73">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>v = [<span class="number">5</span>, <span class="number">4</span>, <span class="number">1</span>, <span class="number">3</span>, <span class="number">2</span>];
|
||
v.sort_unstable_by(|a, b| a.cmp(b));
|
||
<span class="macro">assert!</span>(v == [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>]);
|
||
|
||
<span class="comment">// reverse sorting
|
||
</span>v.sort_unstable_by(|a, b| b.cmp(a));
|
||
<span class="macro">assert!</span>(v == [<span class="number">5</span>, <span class="number">4</span>, <span class="number">3</span>, <span class="number">2</span>, <span class="number">1</span>]);</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sort_unstable_by_key" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.20.0">1.20.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.67.0/src/core/slice/mod.rs.html#2671-2674">source</a></span><h4 class="code-header">pub fn <a href="#method.sort_unstable_by_key" class="fn">sort_unstable_by_key</a><K, F>(&mut self, f: F)<span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.reference.html">&</a>T) -> K,<br> K: <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a>,</span></h4></section></summary><div class="docblock"><p>Sorts the slice with a key extraction function, but might not preserve the order of equal
|
||
elements.</p>
|
||
<p>This sort is unstable (i.e., may reorder equal elements), in-place
|
||
(i.e., does not allocate), and <em>O</em>(m * <em>n</em> * log(<em>n</em>)) worst-case, where the key function is
|
||
<em>O</em>(<em>m</em>).</p>
|
||
<h5 id="current-implementation-3"><a href="#current-implementation-3">Current implementation</a></h5>
|
||
<p>The current algorithm is based on <a href="https://github.com/orlp/pdqsort">pattern-defeating quicksort</a> by Orson Peters,
|
||
which combines the fast average case of randomized quicksort with the fast worst case of
|
||
heapsort, while achieving linear time on slices with certain patterns. It uses some
|
||
randomization to avoid degenerate cases, but with a fixed seed to always provide
|
||
deterministic behavior.</p>
|
||
<p>Due to its key calling strategy, <a href="#method.sort_unstable_by_key"><code>sort_unstable_by_key</code></a>
|
||
is likely to be slower than <a href="#method.sort_by_cached_key"><code>sort_by_cached_key</code></a> in
|
||
cases where the key function is expensive.</p>
|
||
<h5 id="examples-74"><a href="#examples-74">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>v = [-<span class="number">5i32</span>, <span class="number">4</span>, <span class="number">1</span>, -<span class="number">3</span>, <span class="number">2</span>];
|
||
|
||
v.sort_unstable_by_key(|k| k.abs());
|
||
<span class="macro">assert!</span>(v == [<span class="number">1</span>, <span class="number">2</span>, -<span class="number">3</span>, <span class="number">4</span>, -<span class="number">5</span>]);</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.select_nth_unstable" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.49.0">1.49.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.67.0/src/core/slice/mod.rs.html#2718-2720">source</a></span><h4 class="code-header">pub fn <a href="#method.select_nth_unstable" class="fn">select_nth_unstable</a>(<br> &mut self,<br> index: <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.usize.html">usize</a><br>) -> (&mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html">[T]</a>, <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.reference.html">&mut </a>T, &mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html">[T]</a>)<span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a>,</span></h4></section></summary><div class="docblock"><p>Reorder the slice such that the element at <code>index</code> is at its final sorted position.</p>
|
||
<p>This reordering has the additional property that any value at position <code>i < index</code> will be
|
||
less than or equal to any value at a position <code>j > index</code>. Additionally, this reordering is
|
||
unstable (i.e. any number of equal elements may end up at position <code>index</code>), in-place
|
||
(i.e. does not allocate), and <em>O</em>(<em>n</em>) worst-case. This function is also/ known as “kth
|
||
element” in other libraries. It returns a triplet of the following from the reordered slice:
|
||
the subslice prior to <code>index</code>, the element at <code>index</code>, and the subslice after <code>index</code>;
|
||
accordingly, the values in those two subslices will respectively all be less-than-or-equal-to
|
||
and greater-than-or-equal-to the value of the element at <code>index</code>.</p>
|
||
<h5 id="current-implementation-4"><a href="#current-implementation-4">Current implementation</a></h5>
|
||
<p>The current algorithm is based on the quickselect portion of the same quicksort algorithm
|
||
used for <a href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html#method.sort_unstable"><code>sort_unstable</code></a>.</p>
|
||
<h5 id="panics-23"><a href="#panics-23">Panics</a></h5>
|
||
<p>Panics when <code>index >= len()</code>, meaning it always panics on empty slices.</p>
|
||
<h5 id="examples-75"><a href="#examples-75">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>v = [-<span class="number">5i32</span>, <span class="number">4</span>, <span class="number">1</span>, -<span class="number">3</span>, <span class="number">2</span>];
|
||
|
||
<span class="comment">// Find the median
|
||
</span>v.select_nth_unstable(<span class="number">2</span>);
|
||
|
||
<span class="comment">// We are only guaranteed the slice will be one of the following, based on the way we sort
|
||
// about the specified index.
|
||
</span><span class="macro">assert!</span>(v == [-<span class="number">3</span>, -<span class="number">5</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">4</span>] ||
|
||
v == [-<span class="number">5</span>, -<span class="number">3</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">4</span>] ||
|
||
v == [-<span class="number">3</span>, -<span class="number">5</span>, <span class="number">1</span>, <span class="number">4</span>, <span class="number">2</span>] ||
|
||
v == [-<span class="number">5</span>, -<span class="number">3</span>, <span class="number">1</span>, <span class="number">4</span>, <span class="number">2</span>]);</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.select_nth_unstable_by" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.49.0">1.49.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.67.0/src/core/slice/mod.rs.html#2766-2772">source</a></span><h4 class="code-header">pub fn <a href="#method.select_nth_unstable_by" class="fn">select_nth_unstable_by</a><F>(<br> &mut self,<br> index: <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.usize.html">usize</a>,<br> compare: F<br>) -> (&mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html">[T]</a>, <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.reference.html">&mut </a>T, &mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html">[T]</a>)<span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.reference.html">&</a>T, <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.reference.html">&</a>T) -> <a class="enum" href="https://doc.rust-lang.org/1.67.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>,</span></h4></section></summary><div class="docblock"><p>Reorder the slice with a comparator function such that the element at <code>index</code> is at its
|
||
final sorted position.</p>
|
||
<p>This reordering has the additional property that any value at position <code>i < index</code> will be
|
||
less than or equal to any value at a position <code>j > index</code> using the comparator function.
|
||
Additionally, this reordering is unstable (i.e. any number of equal elements may end up at
|
||
position <code>index</code>), in-place (i.e. does not allocate), and <em>O</em>(<em>n</em>) worst-case. This function
|
||
is also known as “kth element” in other libraries. It returns a triplet of the following from
|
||
the slice reordered according to the provided comparator function: the subslice prior to
|
||
<code>index</code>, the element at <code>index</code>, and the subslice after <code>index</code>; accordingly, the values in
|
||
those two subslices will respectively all be less-than-or-equal-to and greater-than-or-equal-to
|
||
the value of the element at <code>index</code>.</p>
|
||
<h5 id="current-implementation-5"><a href="#current-implementation-5">Current implementation</a></h5>
|
||
<p>The current algorithm is based on the quickselect portion of the same quicksort algorithm
|
||
used for <a href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html#method.sort_unstable"><code>sort_unstable</code></a>.</p>
|
||
<h5 id="panics-24"><a href="#panics-24">Panics</a></h5>
|
||
<p>Panics when <code>index >= len()</code>, meaning it always panics on empty slices.</p>
|
||
<h5 id="examples-76"><a href="#examples-76">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>v = [-<span class="number">5i32</span>, <span class="number">4</span>, <span class="number">1</span>, -<span class="number">3</span>, <span class="number">2</span>];
|
||
|
||
<span class="comment">// Find the median as if the slice were sorted in descending order.
|
||
</span>v.select_nth_unstable_by(<span class="number">2</span>, |a, b| b.cmp(a));
|
||
|
||
<span class="comment">// We are only guaranteed the slice will be one of the following, based on the way we sort
|
||
// about the specified index.
|
||
</span><span class="macro">assert!</span>(v == [<span class="number">2</span>, <span class="number">4</span>, <span class="number">1</span>, -<span class="number">5</span>, -<span class="number">3</span>] ||
|
||
v == [<span class="number">2</span>, <span class="number">4</span>, <span class="number">1</span>, -<span class="number">3</span>, -<span class="number">5</span>] ||
|
||
v == [<span class="number">4</span>, <span class="number">2</span>, <span class="number">1</span>, -<span class="number">5</span>, -<span class="number">3</span>] ||
|
||
v == [<span class="number">4</span>, <span class="number">2</span>, <span class="number">1</span>, -<span class="number">3</span>, -<span class="number">5</span>]);</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.select_nth_unstable_by_key" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.49.0">1.49.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.67.0/src/core/slice/mod.rs.html#2818-2825">source</a></span><h4 class="code-header">pub fn <a href="#method.select_nth_unstable_by_key" class="fn">select_nth_unstable_by_key</a><K, F>(<br> &mut self,<br> index: <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.usize.html">usize</a>,<br> f: F<br>) -> (&mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html">[T]</a>, <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.reference.html">&mut </a>T, &mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html">[T]</a>)<span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.reference.html">&</a>T) -> K,<br> K: <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a>,</span></h4></section></summary><div class="docblock"><p>Reorder the slice with a key extraction function such that the element at <code>index</code> is at its
|
||
final sorted position.</p>
|
||
<p>This reordering has the additional property that any value at position <code>i < index</code> will be
|
||
less than or equal to any value at a position <code>j > index</code> using the key extraction function.
|
||
Additionally, this reordering is unstable (i.e. any number of equal elements may end up at
|
||
position <code>index</code>), in-place (i.e. does not allocate), and <em>O</em>(<em>n</em>) worst-case. This function
|
||
is also known as “kth element” in other libraries. It returns a triplet of the following from
|
||
the slice reordered according to the provided key extraction function: the subslice prior to
|
||
<code>index</code>, the element at <code>index</code>, and the subslice after <code>index</code>; accordingly, the values in
|
||
those two subslices will respectively all be less-than-or-equal-to and greater-than-or-equal-to
|
||
the value of the element at <code>index</code>.</p>
|
||
<h5 id="current-implementation-6"><a href="#current-implementation-6">Current implementation</a></h5>
|
||
<p>The current algorithm is based on the quickselect portion of the same quicksort algorithm
|
||
used for <a href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html#method.sort_unstable"><code>sort_unstable</code></a>.</p>
|
||
<h5 id="panics-25"><a href="#panics-25">Panics</a></h5>
|
||
<p>Panics when <code>index >= len()</code>, meaning it always panics on empty slices.</p>
|
||
<h5 id="examples-77"><a href="#examples-77">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>v = [-<span class="number">5i32</span>, <span class="number">4</span>, <span class="number">1</span>, -<span class="number">3</span>, <span class="number">2</span>];
|
||
|
||
<span class="comment">// Return the median as if the array were sorted according to absolute value.
|
||
</span>v.select_nth_unstable_by_key(<span class="number">2</span>, |a| a.abs());
|
||
|
||
<span class="comment">// We are only guaranteed the slice will be one of the following, based on the way we sort
|
||
// about the specified index.
|
||
</span><span class="macro">assert!</span>(v == [<span class="number">1</span>, <span class="number">2</span>, -<span class="number">3</span>, <span class="number">4</span>, -<span class="number">5</span>] ||
|
||
v == [<span class="number">1</span>, <span class="number">2</span>, -<span class="number">3</span>, -<span class="number">5</span>, <span class="number">4</span>] ||
|
||
v == [<span class="number">2</span>, <span class="number">1</span>, -<span class="number">3</span>, <span class="number">4</span>, -<span class="number">5</span>] ||
|
||
v == [<span class="number">2</span>, <span class="number">1</span>, -<span class="number">3</span>, -<span class="number">5</span>, <span class="number">4</span>]);</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.partition_dedup" class="method has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.67.0/src/core/slice/mod.rs.html#2852-2854">source</a><h4 class="code-header">pub fn <a href="#method.partition_dedup" class="fn">partition_dedup</a>(&mut self) -> (&mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html">[T]</a>, &mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html">[T]</a>)<span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><T>,</span></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_partition_dedup</code>)</span></div></span></summary><div class="docblock"><p>Moves all consecutive repeated elements to the end of the slice according to the
|
||
<a href="https://doc.rust-lang.org/1.67.0/core/cmp/trait.PartialEq.html" title="PartialEq"><code>PartialEq</code></a> trait implementation.</p>
|
||
<p>Returns two slices. The first contains no consecutive repeated elements.
|
||
The second contains all the duplicates in no specified order.</p>
|
||
<p>If the slice is sorted, the first returned slice contains no duplicates.</p>
|
||
<h5 id="examples-78"><a href="#examples-78">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_partition_dedup)]
|
||
|
||
</span><span class="kw">let </span><span class="kw-2">mut </span>slice = [<span class="number">1</span>, <span class="number">2</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">3</span>, <span class="number">2</span>, <span class="number">1</span>, <span class="number">1</span>];
|
||
|
||
<span class="kw">let </span>(dedup, duplicates) = slice.partition_dedup();
|
||
|
||
<span class="macro">assert_eq!</span>(dedup, [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">2</span>, <span class="number">1</span>]);
|
||
<span class="macro">assert_eq!</span>(duplicates, [<span class="number">2</span>, <span class="number">3</span>, <span class="number">1</span>]);</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.partition_dedup_by" class="method has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.67.0/src/core/slice/mod.rs.html#2886-2888">source</a><h4 class="code-header">pub fn <a href="#method.partition_dedup_by" class="fn">partition_dedup_by</a><F>(&mut self, same_bucket: F) -> (&mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html">[T]</a>, &mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html">[T]</a>)<span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.reference.html">&mut </a>T, <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.reference.html">&mut </a>T) -> <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.bool.html">bool</a>,</span></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_partition_dedup</code>)</span></div></span></summary><div class="docblock"><p>Moves all but the first of consecutive elements to the end of the slice satisfying
|
||
a given equality relation.</p>
|
||
<p>Returns two slices. The first contains no consecutive repeated elements.
|
||
The second contains all the duplicates in no specified order.</p>
|
||
<p>The <code>same_bucket</code> function is passed references to two elements from the slice and
|
||
must determine if the elements compare equal. The elements are passed in opposite order
|
||
from their order in the slice, so if <code>same_bucket(a, b)</code> returns <code>true</code>, <code>a</code> is moved
|
||
at the end of the slice.</p>
|
||
<p>If the slice is sorted, the first returned slice contains no duplicates.</p>
|
||
<h5 id="examples-79"><a href="#examples-79">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_partition_dedup)]
|
||
|
||
</span><span class="kw">let </span><span class="kw-2">mut </span>slice = [<span class="string">"foo"</span>, <span class="string">"Foo"</span>, <span class="string">"BAZ"</span>, <span class="string">"Bar"</span>, <span class="string">"bar"</span>, <span class="string">"baz"</span>, <span class="string">"BAZ"</span>];
|
||
|
||
<span class="kw">let </span>(dedup, duplicates) = slice.partition_dedup_by(|a, b| a.eq_ignore_ascii_case(b));
|
||
|
||
<span class="macro">assert_eq!</span>(dedup, [<span class="string">"foo"</span>, <span class="string">"BAZ"</span>, <span class="string">"Bar"</span>, <span class="string">"baz"</span>]);
|
||
<span class="macro">assert_eq!</span>(duplicates, [<span class="string">"bar"</span>, <span class="string">"Foo"</span>, <span class="string">"BAZ"</span>]);</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.partition_dedup_by_key" class="method has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.67.0/src/core/slice/mod.rs.html#3012-3015">source</a><h4 class="code-header">pub fn <a href="#method.partition_dedup_by_key" class="fn">partition_dedup_by_key</a><K, F>(&mut self, key: F) -> (&mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html">[T]</a>, &mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html">[T]</a>)<span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.reference.html">&mut </a>T) -> K,<br> K: <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><K>,</span></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_partition_dedup</code>)</span></div></span></summary><div class="docblock"><p>Moves all but the first of consecutive elements to the end of the slice that resolve
|
||
to the same key.</p>
|
||
<p>Returns two slices. The first contains no consecutive repeated elements.
|
||
The second contains all the duplicates in no specified order.</p>
|
||
<p>If the slice is sorted, the first returned slice contains no duplicates.</p>
|
||
<h5 id="examples-80"><a href="#examples-80">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_partition_dedup)]
|
||
|
||
</span><span class="kw">let </span><span class="kw-2">mut </span>slice = [<span class="number">10</span>, <span class="number">20</span>, <span class="number">21</span>, <span class="number">30</span>, <span class="number">30</span>, <span class="number">20</span>, <span class="number">11</span>, <span class="number">13</span>];
|
||
|
||
<span class="kw">let </span>(dedup, duplicates) = slice.partition_dedup_by_key(|i| <span class="kw-2">*</span>i / <span class="number">10</span>);
|
||
|
||
<span class="macro">assert_eq!</span>(dedup, [<span class="number">10</span>, <span class="number">20</span>, <span class="number">30</span>, <span class="number">20</span>, <span class="number">11</span>]);
|
||
<span class="macro">assert_eq!</span>(duplicates, [<span class="number">21</span>, <span class="number">30</span>, <span class="number">13</span>]);</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.rotate_left" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.26.0">1.26.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.67.0/src/core/slice/mod.rs.html#3051">source</a></span><h4 class="code-header">pub fn <a href="#method.rotate_left" class="fn">rotate_left</a>(&mut self, mid: <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.usize.html">usize</a>)</h4></section></summary><div class="docblock"><p>Rotates the slice in-place such that the first <code>mid</code> elements of the
|
||
slice move to the end while the last <code>self.len() - mid</code> elements move to
|
||
the front. After calling <code>rotate_left</code>, the element previously at index
|
||
<code>mid</code> will become the first element in the slice.</p>
|
||
<h5 id="panics-26"><a href="#panics-26">Panics</a></h5>
|
||
<p>This function will panic if <code>mid</code> is greater than the length of the
|
||
slice. Note that <code>mid == self.len()</code> does <em>not</em> panic and is a no-op
|
||
rotation.</p>
|
||
<h5 id="complexity"><a href="#complexity">Complexity</a></h5>
|
||
<p>Takes linear (in <code>self.len()</code>) time.</p>
|
||
<h5 id="examples-81"><a href="#examples-81">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>a = [<span class="string">'a'</span>, <span class="string">'b'</span>, <span class="string">'c'</span>, <span class="string">'d'</span>, <span class="string">'e'</span>, <span class="string">'f'</span>];
|
||
a.rotate_left(<span class="number">2</span>);
|
||
<span class="macro">assert_eq!</span>(a, [<span class="string">'c'</span>, <span class="string">'d'</span>, <span class="string">'e'</span>, <span class="string">'f'</span>, <span class="string">'a'</span>, <span class="string">'b'</span>]);</code></pre></div>
|
||
<p>Rotating a subslice:</p>
|
||
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>a = [<span class="string">'a'</span>, <span class="string">'b'</span>, <span class="string">'c'</span>, <span class="string">'d'</span>, <span class="string">'e'</span>, <span class="string">'f'</span>];
|
||
a[<span class="number">1</span>..<span class="number">5</span>].rotate_left(<span class="number">1</span>);
|
||
<span class="macro">assert_eq!</span>(a, [<span class="string">'a'</span>, <span class="string">'c'</span>, <span class="string">'d'</span>, <span class="string">'e'</span>, <span class="string">'b'</span>, <span class="string">'f'</span>]);</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.rotate_right" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.26.0">1.26.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.67.0/src/core/slice/mod.rs.html#3094">source</a></span><h4 class="code-header">pub fn <a href="#method.rotate_right" class="fn">rotate_right</a>(&mut self, k: <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.usize.html">usize</a>)</h4></section></summary><div class="docblock"><p>Rotates the slice in-place such that the first <code>self.len() - k</code>
|
||
elements of the slice move to the end while the last <code>k</code> elements move
|
||
to the front. After calling <code>rotate_right</code>, the element previously at
|
||
index <code>self.len() - k</code> will become the first element in the slice.</p>
|
||
<h5 id="panics-27"><a href="#panics-27">Panics</a></h5>
|
||
<p>This function will panic if <code>k</code> is greater than the length of the
|
||
slice. Note that <code>k == self.len()</code> does <em>not</em> panic and is a no-op
|
||
rotation.</p>
|
||
<h5 id="complexity-1"><a href="#complexity-1">Complexity</a></h5>
|
||
<p>Takes linear (in <code>self.len()</code>) time.</p>
|
||
<h5 id="examples-82"><a href="#examples-82">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>a = [<span class="string">'a'</span>, <span class="string">'b'</span>, <span class="string">'c'</span>, <span class="string">'d'</span>, <span class="string">'e'</span>, <span class="string">'f'</span>];
|
||
a.rotate_right(<span class="number">2</span>);
|
||
<span class="macro">assert_eq!</span>(a, [<span class="string">'e'</span>, <span class="string">'f'</span>, <span class="string">'a'</span>, <span class="string">'b'</span>, <span class="string">'c'</span>, <span class="string">'d'</span>]);</code></pre></div>
|
||
<p>Rotate a subslice:</p>
|
||
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>a = [<span class="string">'a'</span>, <span class="string">'b'</span>, <span class="string">'c'</span>, <span class="string">'d'</span>, <span class="string">'e'</span>, <span class="string">'f'</span>];
|
||
a[<span class="number">1</span>..<span class="number">5</span>].rotate_right(<span class="number">1</span>);
|
||
<span class="macro">assert_eq!</span>(a, [<span class="string">'a'</span>, <span class="string">'e'</span>, <span class="string">'b'</span>, <span class="string">'c'</span>, <span class="string">'d'</span>, <span class="string">'f'</span>]);</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.fill" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.50.0">1.50.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.67.0/src/core/slice/mod.rs.html#3117-3119">source</a></span><h4 class="code-header">pub fn <a href="#method.fill" class="fn">fill</a>(&mut self, value: T)<span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</span></h4></section></summary><div class="docblock"><p>Fills <code>self</code> with elements by cloning <code>value</code>.</p>
|
||
<h5 id="examples-83"><a href="#examples-83">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="macro">vec!</span>[<span class="number">0</span>; <span class="number">10</span>];
|
||
buf.fill(<span class="number">1</span>);
|
||
<span class="macro">assert_eq!</span>(buf, <span class="macro">vec!</span>[<span class="number">1</span>; <span class="number">10</span>]);</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.fill_with" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.51.0">1.51.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.67.0/src/core/slice/mod.rs.html#3141-3143">source</a></span><h4 class="code-header">pub fn <a href="#method.fill_with" class="fn">fill_with</a><F>(&mut self, f: F)<span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>() -> T,</span></h4></section></summary><div class="docblock"><p>Fills <code>self</code> with elements returned by calling a closure repeatedly.</p>
|
||
<p>This method uses a closure to create new values. If you’d rather
|
||
<a href="https://doc.rust-lang.org/1.67.0/core/clone/trait.Clone.html" title="Clone"><code>Clone</code></a> a given value, use <a href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html#method.fill"><code>fill</code></a>. If you want to use the <a href="https://doc.rust-lang.org/1.67.0/core/default/trait.Default.html" title="Default"><code>Default</code></a>
|
||
trait to generate values, you can pass <a href="https://doc.rust-lang.org/1.67.0/core/default/trait.Default.html#tymethod.default" title="Default::default"><code>Default::default</code></a> as the
|
||
argument.</p>
|
||
<h5 id="examples-84"><a href="#examples-84">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>buf = <span class="macro">vec!</span>[<span class="number">1</span>; <span class="number">10</span>];
|
||
buf.fill_with(Default::default);
|
||
<span class="macro">assert_eq!</span>(buf, <span class="macro">vec!</span>[<span class="number">0</span>; <span class="number">10</span>]);</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.clone_from_slice-1" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.7.0">1.7.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.67.0/src/core/slice/mod.rs.html#3204-3206">source</a></span><h4 class="code-header">pub fn <a href="#method.clone_from_slice-1" class="fn">clone_from_slice</a>(&mut self, src: &<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html">[T]</a>)<span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</span></h4></section></summary><div class="docblock"><p>Copies the elements from <code>src</code> into <code>self</code>.</p>
|
||
<p>The length of <code>src</code> must be the same as <code>self</code>.</p>
|
||
<h5 id="panics-28"><a href="#panics-28">Panics</a></h5>
|
||
<p>This function will panic if the two slices have different lengths.</p>
|
||
<h5 id="examples-85"><a href="#examples-85">Examples</a></h5>
|
||
<p>Cloning two elements from a slice into another:</p>
|
||
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>src = [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>];
|
||
<span class="kw">let </span><span class="kw-2">mut </span>dst = [<span class="number">0</span>, <span class="number">0</span>];
|
||
|
||
<span class="comment">// Because the slices have to be the same length,
|
||
// we slice the source slice from four elements
|
||
// to two. It will panic if we don't do this.
|
||
</span>dst.clone_from_slice(<span class="kw-2">&</span>src[<span class="number">2</span>..]);
|
||
|
||
<span class="macro">assert_eq!</span>(src, [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>]);
|
||
<span class="macro">assert_eq!</span>(dst, [<span class="number">3</span>, <span class="number">4</span>]);</code></pre></div>
|
||
<p>Rust enforces that there can only be one mutable reference with no
|
||
immutable references to a particular piece of data in a particular
|
||
scope. Because of this, attempting to use <code>clone_from_slice</code> on a
|
||
single slice will result in a compile failure:</p>
|
||
|
||
<div class="example-wrap compile_fail"><div class='tooltip'>ⓘ</div><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>slice = [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>];
|
||
|
||
slice[..<span class="number">2</span>].clone_from_slice(<span class="kw-2">&</span>slice[<span class="number">3</span>..]); <span class="comment">// compile fail!</span></code></pre></div>
|
||
<p>To work around this, we can use <a href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html#method.split_at_mut"><code>split_at_mut</code></a> to create two distinct
|
||
sub-slices from a slice:</p>
|
||
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>slice = [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>];
|
||
|
||
{
|
||
<span class="kw">let </span>(left, right) = slice.split_at_mut(<span class="number">2</span>);
|
||
left.clone_from_slice(<span class="kw-2">&</span>right[<span class="number">1</span>..]);
|
||
}
|
||
|
||
<span class="macro">assert_eq!</span>(slice, [<span class="number">4</span>, <span class="number">5</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>]);</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.copy_from_slice" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.9.0">1.9.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.67.0/src/core/slice/mod.rs.html#3268-3270">source</a></span><h4 class="code-header">pub fn <a href="#method.copy_from_slice" class="fn">copy_from_slice</a>(&mut self, src: &<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html">[T]</a>)<span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a>,</span></h4></section></summary><div class="docblock"><p>Copies all elements from <code>src</code> into <code>self</code>, using a memcpy.</p>
|
||
<p>The length of <code>src</code> must be the same as <code>self</code>.</p>
|
||
<p>If <code>T</code> does not implement <code>Copy</code>, use <a href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html#method.clone_from_slice"><code>clone_from_slice</code></a>.</p>
|
||
<h5 id="panics-29"><a href="#panics-29">Panics</a></h5>
|
||
<p>This function will panic if the two slices have different lengths.</p>
|
||
<h5 id="examples-86"><a href="#examples-86">Examples</a></h5>
|
||
<p>Copying two elements from a slice into another:</p>
|
||
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>src = [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>];
|
||
<span class="kw">let </span><span class="kw-2">mut </span>dst = [<span class="number">0</span>, <span class="number">0</span>];
|
||
|
||
<span class="comment">// Because the slices have to be the same length,
|
||
// we slice the source slice from four elements
|
||
// to two. It will panic if we don't do this.
|
||
</span>dst.copy_from_slice(<span class="kw-2">&</span>src[<span class="number">2</span>..]);
|
||
|
||
<span class="macro">assert_eq!</span>(src, [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>]);
|
||
<span class="macro">assert_eq!</span>(dst, [<span class="number">3</span>, <span class="number">4</span>]);</code></pre></div>
|
||
<p>Rust enforces that there can only be one mutable reference with no
|
||
immutable references to a particular piece of data in a particular
|
||
scope. Because of this, attempting to use <code>copy_from_slice</code> on a
|
||
single slice will result in a compile failure:</p>
|
||
|
||
<div class="example-wrap compile_fail"><div class='tooltip'>ⓘ</div><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>slice = [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>];
|
||
|
||
slice[..<span class="number">2</span>].copy_from_slice(<span class="kw-2">&</span>slice[<span class="number">3</span>..]); <span class="comment">// compile fail!</span></code></pre></div>
|
||
<p>To work around this, we can use <a href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html#method.split_at_mut"><code>split_at_mut</code></a> to create two distinct
|
||
sub-slices from a slice:</p>
|
||
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>slice = [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>];
|
||
|
||
{
|
||
<span class="kw">let </span>(left, right) = slice.split_at_mut(<span class="number">2</span>);
|
||
left.copy_from_slice(<span class="kw-2">&</span>right[<span class="number">1</span>..]);
|
||
}
|
||
|
||
<span class="macro">assert_eq!</span>(slice, [<span class="number">4</span>, <span class="number">5</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>]);</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.copy_within" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.37.0">1.37.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.67.0/src/core/slice/mod.rs.html#3322-3324">source</a></span><h4 class="code-header">pub fn <a href="#method.copy_within" class="fn">copy_within</a><R>(&mut self, src: R, dest: <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.usize.html">usize</a>)<span class="where fmt-newline">where<br> R: <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/ops/range/trait.RangeBounds.html" title="trait core::ops::range::RangeBounds">RangeBounds</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.usize.html">usize</a>>,<br> T: <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a>,</span></h4></section></summary><div class="docblock"><p>Copies elements from one part of the slice to another part of itself,
|
||
using a memmove.</p>
|
||
<p><code>src</code> is the range within <code>self</code> to copy from. <code>dest</code> is the starting
|
||
index of the range within <code>self</code> to copy to, which will have the same
|
||
length as <code>src</code>. The two ranges may overlap. The ends of the two ranges
|
||
must be less than or equal to <code>self.len()</code>.</p>
|
||
<h5 id="panics-30"><a href="#panics-30">Panics</a></h5>
|
||
<p>This function will panic if either range exceeds the end of the slice,
|
||
or if the end of <code>src</code> is before the start.</p>
|
||
<h5 id="examples-87"><a href="#examples-87">Examples</a></h5>
|
||
<p>Copying four bytes within a slice:</p>
|
||
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>bytes = <span class="kw-2">*</span><span class="string">b"Hello, World!"</span>;
|
||
|
||
bytes.copy_within(<span class="number">1</span>..<span class="number">5</span>, <span class="number">8</span>);
|
||
|
||
<span class="macro">assert_eq!</span>(<span class="kw-2">&</span>bytes, <span class="string">b"Hello, Wello!"</span>);</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.swap_with_slice" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.27.0">1.27.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.67.0/src/core/slice/mod.rs.html#3389">source</a></span><h4 class="code-header">pub fn <a href="#method.swap_with_slice" class="fn">swap_with_slice</a>(&mut self, other: &mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html">[T]</a>)</h4></section></summary><div class="docblock"><p>Swaps all elements in <code>self</code> with those in <code>other</code>.</p>
|
||
<p>The length of <code>other</code> must be the same as <code>self</code>.</p>
|
||
<h5 id="panics-31"><a href="#panics-31">Panics</a></h5>
|
||
<p>This function will panic if the two slices have different lengths.</p>
|
||
<h5 id="example"><a href="#example">Example</a></h5>
|
||
<p>Swapping two elements across slices:</p>
|
||
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>slice1 = [<span class="number">0</span>, <span class="number">0</span>];
|
||
<span class="kw">let </span><span class="kw-2">mut </span>slice2 = [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>];
|
||
|
||
slice1.swap_with_slice(<span class="kw-2">&mut </span>slice2[<span class="number">2</span>..]);
|
||
|
||
<span class="macro">assert_eq!</span>(slice1, [<span class="number">3</span>, <span class="number">4</span>]);
|
||
<span class="macro">assert_eq!</span>(slice2, [<span class="number">1</span>, <span class="number">2</span>, <span class="number">0</span>, <span class="number">0</span>]);</code></pre></div>
|
||
<p>Rust enforces that there can only be one mutable reference to a
|
||
particular piece of data in a particular scope. Because of this,
|
||
attempting to use <code>swap_with_slice</code> on a single slice will result in
|
||
a compile failure:</p>
|
||
|
||
<div class="example-wrap compile_fail"><div class='tooltip'>ⓘ</div><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>slice = [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>];
|
||
slice[..<span class="number">2</span>].swap_with_slice(<span class="kw-2">&mut </span>slice[<span class="number">3</span>..]); <span class="comment">// compile fail!</span></code></pre></div>
|
||
<p>To work around this, we can use <a href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html#method.split_at_mut"><code>split_at_mut</code></a> to create two distinct
|
||
mutable sub-slices from a slice:</p>
|
||
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>slice = [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>];
|
||
|
||
{
|
||
<span class="kw">let </span>(left, right) = slice.split_at_mut(<span class="number">2</span>);
|
||
left.swap_with_slice(<span class="kw-2">&mut </span>right[<span class="number">1</span>..]);
|
||
}
|
||
|
||
<span class="macro">assert_eq!</span>(slice, [<span class="number">4</span>, <span class="number">5</span>, <span class="number">3</span>, <span class="number">1</span>, <span class="number">2</span>]);</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.align_to" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.30.0">1.30.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.67.0/src/core/slice/mod.rs.html#3500">source</a></span><h4 class="code-header">pub unsafe fn <a href="#method.align_to" class="fn">align_to</a><U>(&self) -> (&<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html">[T]</a>, &<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html">[U]</a>, &<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html">[T]</a>)</h4></section></summary><div class="docblock"><p>Transmute the slice to a slice of another type, ensuring alignment of the types is
|
||
maintained.</p>
|
||
<p>This method splits the slice into three distinct slices: prefix, correctly aligned middle
|
||
slice of a new type, and the suffix slice. How exactly the slice is split up is not
|
||
specified; the middle part may be smaller than necessary. However, if this fails to return a
|
||
maximal middle part, that is because code is running in a context where performance does not
|
||
matter, such as a sanitizer attempting to find alignment bugs. Regular code running
|
||
in a default (debug or release) execution <em>will</em> return a maximal middle part.</p>
|
||
<p>This method has no purpose when either input element <code>T</code> or output element <code>U</code> are
|
||
zero-sized and will return the original slice without splitting anything.</p>
|
||
<h5 id="safety-7"><a href="#safety-7">Safety</a></h5>
|
||
<p>This method is essentially a <code>transmute</code> with respect to the elements in the returned
|
||
middle slice, so all the usual caveats pertaining to <code>transmute::<T, U></code> also apply here.</p>
|
||
<h5 id="examples-88"><a href="#examples-88">Examples</a></h5>
|
||
<p>Basic usage:</p>
|
||
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">unsafe </span>{
|
||
<span class="kw">let </span>bytes: [u8; <span class="number">7</span>] = [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>, <span class="number">7</span>];
|
||
<span class="kw">let </span>(prefix, shorts, suffix) = bytes.align_to::<u16>();
|
||
<span class="comment">// less_efficient_algorithm_for_bytes(prefix);
|
||
// more_efficient_algorithm_for_aligned_shorts(shorts);
|
||
// less_efficient_algorithm_for_bytes(suffix);
|
||
</span>}</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.align_to_mut" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.30.0">1.30.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.67.0/src/core/slice/mod.rs.html#3562">source</a></span><h4 class="code-header">pub unsafe fn <a href="#method.align_to_mut" class="fn">align_to_mut</a><U>(&mut self) -> (&mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html">[T]</a>, &mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html">[U]</a>, &mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html">[T]</a>)</h4></section></summary><div class="docblock"><p>Transmute the mutable slice to a mutable slice of another type, ensuring alignment of the
|
||
types is maintained.</p>
|
||
<p>This method splits the slice into three distinct slices: prefix, correctly aligned middle
|
||
slice of a new type, and the suffix slice. How exactly the slice is split up is not
|
||
specified; the middle part may be smaller than necessary. However, if this fails to return a
|
||
maximal middle part, that is because code is running in a context where performance does not
|
||
matter, such as a sanitizer attempting to find alignment bugs. Regular code running
|
||
in a default (debug or release) execution <em>will</em> return a maximal middle part.</p>
|
||
<p>This method has no purpose when either input element <code>T</code> or output element <code>U</code> are
|
||
zero-sized and will return the original slice without splitting anything.</p>
|
||
<h5 id="safety-8"><a href="#safety-8">Safety</a></h5>
|
||
<p>This method is essentially a <code>transmute</code> with respect to the elements in the returned
|
||
middle slice, so all the usual caveats pertaining to <code>transmute::<T, U></code> also apply here.</p>
|
||
<h5 id="examples-89"><a href="#examples-89">Examples</a></h5>
|
||
<p>Basic usage:</p>
|
||
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">unsafe </span>{
|
||
<span class="kw">let </span><span class="kw-2">mut </span>bytes: [u8; <span class="number">7</span>] = [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>, <span class="number">7</span>];
|
||
<span class="kw">let </span>(prefix, shorts, suffix) = bytes.align_to_mut::<u16>();
|
||
<span class="comment">// less_efficient_algorithm_for_bytes(prefix);
|
||
// more_efficient_algorithm_for_aligned_shorts(shorts);
|
||
// less_efficient_algorithm_for_bytes(suffix);
|
||
</span>}</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_simd" class="method has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.67.0/src/core/slice/mod.rs.html#3657-3661">source</a><h4 class="code-header">pub fn <a href="#method.as_simd" class="fn">as_simd</a><const LANES: <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.usize.html">usize</a>>(&self) -> (&<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html">[T]</a>, &[<a class="struct" href="https://doc.rust-lang.org/1.67.0/core/core_simd/vector/struct.Simd.html" title="struct core::core_simd::vector::Simd">Simd</a><T, LANES>], &<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html">[T]</a>)<span class="where fmt-newline">where<br> <a class="struct" href="https://doc.rust-lang.org/1.67.0/core/core_simd/vector/struct.Simd.html" title="struct core::core_simd::vector::Simd">Simd</a><T, LANES>: <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; LANES]</a>>,<br> T: <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/core_simd/vector/trait.SimdElement.html" title="trait core::core_simd::vector::SimdElement">SimdElement</a>,<br> <a class="struct" href="https://doc.rust-lang.org/1.67.0/core/core_simd/lane_count/struct.LaneCount.html" title="struct core::core_simd::lane_count::LaneCount">LaneCount</a><LANES>: <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/core_simd/lane_count/trait.SupportedLaneCount.html" title="trait core::core_simd::lane_count::SupportedLaneCount">SupportedLaneCount</a>,</span></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>portable_simd</code>)</span></div></span></summary><div class="docblock"><p>Split a slice into a prefix, a middle of aligned SIMD types, and a suffix.</p>
|
||
<p>This is a safe wrapper around <a href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html#method.align_to" title="slice::align_to"><code>slice::align_to</code></a>, so has the same weak
|
||
postconditions as that method. You’re only assured that
|
||
<code>self.len() == prefix.len() + middle.len() * LANES + suffix.len()</code>.</p>
|
||
<p>Notably, all of the following are possible:</p>
|
||
<ul>
|
||
<li><code>prefix.len() >= LANES</code>.</li>
|
||
<li><code>middle.is_empty()</code> despite <code>self.len() >= 3 * LANES</code>.</li>
|
||
<li><code>suffix.len() >= LANES</code>.</li>
|
||
</ul>
|
||
<p>That said, this is a safe method, so if you’re only writing safe code,
|
||
then this can at most cause incorrect logic, not unsoundness.</p>
|
||
<h5 id="panics-32"><a href="#panics-32">Panics</a></h5>
|
||
<p>This will panic if the size of the SIMD type is different from
|
||
<code>LANES</code> times that of the scalar.</p>
|
||
<p>At the time of writing, the trait restrictions on <code>Simd<T, LANES></code> keeps
|
||
that from ever happening, as only power-of-two numbers of lanes are
|
||
supported. It’s possible that, in the future, those restrictions might
|
||
be lifted in a way that would make it possible to see panics from this
|
||
method for something like <code>LANES == 3</code>.</p>
|
||
<h5 id="examples-90"><a href="#examples-90">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(portable_simd)]
|
||
</span><span class="kw">use </span>core::simd::SimdFloat;
|
||
|
||
<span class="kw">let </span>short = <span class="kw-2">&</span>[<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>];
|
||
<span class="kw">let </span>(prefix, middle, suffix) = short.as_simd::<<span class="number">4</span>>();
|
||
<span class="macro">assert_eq!</span>(middle, []); <span class="comment">// Not enough elements for anything in the middle
|
||
|
||
// They might be split in any possible way between prefix and suffix
|
||
</span><span class="kw">let </span>it = prefix.iter().chain(suffix).copied();
|
||
<span class="macro">assert_eq!</span>(it.collect::<Vec<<span class="kw">_</span>>>(), <span class="macro">vec!</span>[<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>]);
|
||
|
||
<span class="kw">fn </span>basic_simd_sum(x: <span class="kw-2">&</span>[f32]) -> f32 {
|
||
<span class="kw">use </span>std::ops::Add;
|
||
<span class="kw">use </span>std::simd::f32x4;
|
||
<span class="kw">let </span>(prefix, middle, suffix) = x.as_simd();
|
||
<span class="kw">let </span>sums = f32x4::from_array([
|
||
prefix.iter().copied().sum(),
|
||
<span class="number">0.0</span>,
|
||
<span class="number">0.0</span>,
|
||
suffix.iter().copied().sum(),
|
||
]);
|
||
<span class="kw">let </span>sums = middle.iter().copied().fold(sums, f32x4::add);
|
||
sums.reduce_sum()
|
||
}
|
||
|
||
<span class="kw">let </span>numbers: Vec<f32> = (<span class="number">1</span>..<span class="number">101</span>).map(|x| x <span class="kw">as _</span>).collect();
|
||
<span class="macro">assert_eq!</span>(basic_simd_sum(<span class="kw-2">&</span>numbers[<span class="number">1</span>..<span class="number">99</span>]), <span class="number">4949.0</span>);</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_simd_mut" class="method has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.67.0/src/core/slice/mod.rs.html#3702-3706">source</a><h4 class="code-header">pub fn <a href="#method.as_simd_mut" class="fn">as_simd_mut</a><const LANES: <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.usize.html">usize</a>>(<br> &mut self<br>) -> (&mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html">[T]</a>, &mut [<a class="struct" href="https://doc.rust-lang.org/1.67.0/core/core_simd/vector/struct.Simd.html" title="struct core::core_simd::vector::Simd">Simd</a><T, LANES>], &mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html">[T]</a>)<span class="where fmt-newline">where<br> <a class="struct" href="https://doc.rust-lang.org/1.67.0/core/core_simd/vector/struct.Simd.html" title="struct core::core_simd::vector::Simd">Simd</a><T, LANES>: <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsMut.html" title="trait core::convert::AsMut">AsMut</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; LANES]</a>>,<br> T: <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/core_simd/vector/trait.SimdElement.html" title="trait core::core_simd::vector::SimdElement">SimdElement</a>,<br> <a class="struct" href="https://doc.rust-lang.org/1.67.0/core/core_simd/lane_count/struct.LaneCount.html" title="struct core::core_simd::lane_count::LaneCount">LaneCount</a><LANES>: <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/core_simd/lane_count/trait.SupportedLaneCount.html" title="trait core::core_simd::lane_count::SupportedLaneCount">SupportedLaneCount</a>,</span></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>portable_simd</code>)</span></div></span></summary><div class="docblock"><p>Split a mutable slice into a mutable prefix, a middle of aligned SIMD types,
|
||
and a mutable suffix.</p>
|
||
<p>This is a safe wrapper around <a href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html#method.align_to_mut" title="slice::align_to_mut"><code>slice::align_to_mut</code></a>, so has the same weak
|
||
postconditions as that method. You’re only assured that
|
||
<code>self.len() == prefix.len() + middle.len() * LANES + suffix.len()</code>.</p>
|
||
<p>Notably, all of the following are possible:</p>
|
||
<ul>
|
||
<li><code>prefix.len() >= LANES</code>.</li>
|
||
<li><code>middle.is_empty()</code> despite <code>self.len() >= 3 * LANES</code>.</li>
|
||
<li><code>suffix.len() >= LANES</code>.</li>
|
||
</ul>
|
||
<p>That said, this is a safe method, so if you’re only writing safe code,
|
||
then this can at most cause incorrect logic, not unsoundness.</p>
|
||
<p>This is the mutable version of <a href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html#method.as_simd" title="slice::as_simd"><code>slice::as_simd</code></a>; see that for examples.</p>
|
||
<h5 id="panics-33"><a href="#panics-33">Panics</a></h5>
|
||
<p>This will panic if the size of the SIMD type is different from
|
||
<code>LANES</code> times that of the scalar.</p>
|
||
<p>At the time of writing, the trait restrictions on <code>Simd<T, LANES></code> keeps
|
||
that from ever happening, as only power-of-two numbers of lanes are
|
||
supported. It’s possible that, in the future, those restrictions might
|
||
be lifted in a way that would make it possible to see panics from this
|
||
method for something like <code>LANES == 3</code>.</p>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.is_sorted" class="method has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.67.0/src/core/slice/mod.rs.html#3742-3744">source</a><h4 class="code-header">pub fn <a href="#method.is_sorted" class="fn">is_sorted</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.bool.html">bool</a><span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a><T>,</span></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>is_sorted</code>)</span></div></span></summary><div class="docblock"><p>Checks if the elements of this slice are sorted.</p>
|
||
<p>That is, for each element <code>a</code> and its following element <code>b</code>, <code>a <= b</code> must hold. If the
|
||
slice yields exactly zero or one element, <code>true</code> is returned.</p>
|
||
<p>Note that if <code>Self::Item</code> is only <code>PartialOrd</code>, but not <code>Ord</code>, the above definition
|
||
implies that this function returns <code>false</code> if any two consecutive items are not
|
||
comparable.</p>
|
||
<h5 id="examples-91"><a href="#examples-91">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(is_sorted)]
|
||
</span><span class="kw">let </span>empty: [i32; <span class="number">0</span>] = [];
|
||
|
||
<span class="macro">assert!</span>([<span class="number">1</span>, <span class="number">2</span>, <span class="number">2</span>, <span class="number">9</span>].is_sorted());
|
||
<span class="macro">assert!</span>(![<span class="number">1</span>, <span class="number">3</span>, <span class="number">2</span>, <span class="number">4</span>].is_sorted());
|
||
<span class="macro">assert!</span>([<span class="number">0</span>].is_sorted());
|
||
<span class="macro">assert!</span>(empty.is_sorted());
|
||
<span class="macro">assert!</span>(![<span class="number">0.0</span>, <span class="number">1.0</span>, f32::NAN].is_sorted());</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.is_sorted_by" class="method has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.67.0/src/core/slice/mod.rs.html#3758-3760">source</a><h4 class="code-header">pub fn <a href="#method.is_sorted_by" class="fn">is_sorted_by</a><'a, F>(&'a self, compare: F) -> <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.bool.html">bool</a><span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.reference.html">&'a </a>T, <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.reference.html">&'a </a>T) -> <a class="enum" href="https://doc.rust-lang.org/1.67.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="https://doc.rust-lang.org/1.67.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>>,</span></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>is_sorted</code>)</span></div></span></summary><div class="docblock"><p>Checks if the elements of this slice are sorted using the given comparator function.</p>
|
||
<p>Instead of using <code>PartialOrd::partial_cmp</code>, this function uses the given <code>compare</code>
|
||
function to determine the ordering of two elements. Apart from that, it’s equivalent to
|
||
<a href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html#method.is_sorted"><code>is_sorted</code></a>; see its documentation for more information.</p>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.is_sorted_by_key" class="method has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.67.0/src/core/slice/mod.rs.html#3784-3787">source</a><h4 class="code-header">pub fn <a href="#method.is_sorted_by_key" class="fn">is_sorted_by_key</a><'a, F, K>(&'a self, f: F) -> <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.bool.html">bool</a><span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.reference.html">&'a </a>T) -> K,<br> K: <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a><K>,</span></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>is_sorted</code>)</span></div></span></summary><div class="docblock"><p>Checks if the elements of this slice are sorted using the given key extraction function.</p>
|
||
<p>Instead of comparing the slice’s elements directly, this function compares the keys of the
|
||
elements, as determined by <code>f</code>. Apart from that, it’s equivalent to <a href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html#method.is_sorted"><code>is_sorted</code></a>; see its
|
||
documentation for more information.</p>
|
||
<h5 id="examples-92"><a href="#examples-92">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(is_sorted)]
|
||
|
||
</span><span class="macro">assert!</span>([<span class="string">"c"</span>, <span class="string">"bb"</span>, <span class="string">"aaa"</span>].is_sorted_by_key(|s| s.len()));
|
||
<span class="macro">assert!</span>(![-<span class="number">2i32</span>, -<span class="number">1</span>, <span class="number">0</span>, <span class="number">3</span>].is_sorted_by_key(|n| n.abs()));</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.partition_point" class="method has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.52.0">1.52.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.67.0/src/core/slice/mod.rs.html#3843-3845">source</a></span><h4 class="code-header">pub fn <a href="#method.partition_point" class="fn">partition_point</a><P>(&self, pred: P) -> <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.usize.html">usize</a><span class="where fmt-newline">where<br> P: <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.reference.html">&</a>T) -> <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.bool.html">bool</a>,</span></h4></section></summary><div class="docblock"><p>Returns the index of the partition point according to the given predicate
|
||
(the index of the first element of the second partition).</p>
|
||
<p>The slice is assumed to be partitioned according to the given predicate.
|
||
This means that all elements for which the predicate returns true are at the start of the slice
|
||
and all elements for which the predicate returns false are at the end.
|
||
For example, [7, 15, 3, 5, 4, 12, 6] is a partitioned under the predicate x % 2 != 0
|
||
(all odd numbers are at the start, all even at the end).</p>
|
||
<p>If this slice is not partitioned, the returned result is unspecified and meaningless,
|
||
as this method performs a kind of binary search.</p>
|
||
<p>See also <a href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html#method.binary_search"><code>binary_search</code></a>, <a href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html#method.binary_search_by"><code>binary_search_by</code></a>, and <a href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html#method.binary_search_by_key"><code>binary_search_by_key</code></a>.</p>
|
||
<h5 id="examples-93"><a href="#examples-93">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>v = [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">3</span>, <span class="number">5</span>, <span class="number">6</span>, <span class="number">7</span>];
|
||
<span class="kw">let </span>i = v.partition_point(|<span class="kw-2">&</span>x| x < <span class="number">5</span>);
|
||
|
||
<span class="macro">assert_eq!</span>(i, <span class="number">4</span>);
|
||
<span class="macro">assert!</span>(v[..i].iter().all(|<span class="kw-2">&</span>x| x < <span class="number">5</span>));
|
||
<span class="macro">assert!</span>(v[i..].iter().all(|<span class="kw-2">&</span>x| !(x < <span class="number">5</span>)));</code></pre></div>
|
||
<p>If all elements of the slice match the predicate, including if the slice
|
||
is empty, then the length of the slice will be returned:</p>
|
||
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>a = [<span class="number">2</span>, <span class="number">4</span>, <span class="number">8</span>];
|
||
<span class="macro">assert_eq!</span>(a.partition_point(|x| x < <span class="kw-2">&</span><span class="number">100</span>), a.len());
|
||
<span class="kw">let </span>a: [i32; <span class="number">0</span>] = [];
|
||
<span class="macro">assert_eq!</span>(a.partition_point(|x| x < <span class="kw-2">&</span><span class="number">100</span>), <span class="number">0</span>);</code></pre></div>
|
||
<p>If you want to insert an item to a sorted vector, while maintaining
|
||
sort order:</p>
|
||
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>s = <span class="macro">vec!</span>[<span class="number">0</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">5</span>, <span class="number">8</span>, <span class="number">13</span>, <span class="number">21</span>, <span class="number">34</span>, <span class="number">55</span>];
|
||
<span class="kw">let </span>num = <span class="number">42</span>;
|
||
<span class="kw">let </span>idx = s.partition_point(|<span class="kw-2">&</span>x| x < num);
|
||
s.insert(idx, num);
|
||
<span class="macro">assert_eq!</span>(s, [<span class="number">0</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">5</span>, <span class="number">8</span>, <span class="number">13</span>, <span class="number">21</span>, <span class="number">34</span>, <span class="number">42</span>, <span class="number">55</span>]);</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.take" class="method has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.67.0/src/core/slice/mod.rs.html#3901">source</a><h4 class="code-header">pub fn <a href="#method.take" class="fn">take</a><R, 'a>(self: &mut &'a <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html">[T]</a>, range: R) -> <a class="enum" href="https://doc.rust-lang.org/1.67.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&'a <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html">[T]</a>><span class="where fmt-newline">where<br> R: <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/ops/range/trait.OneSidedRange.html" title="trait core::ops::range::OneSidedRange">OneSidedRange</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.usize.html">usize</a>>,</span></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_take</code>)</span></div></span></summary><div class="docblock"><p>Removes the subslice corresponding to the given range
|
||
and returns a reference to it.</p>
|
||
<p>Returns <code>None</code> and does not modify the slice if the given
|
||
range is out of bounds.</p>
|
||
<p>Note that this method only accepts one-sided ranges such as
|
||
<code>2..</code> or <code>..6</code>, but not <code>2..6</code>.</p>
|
||
<h5 id="examples-94"><a href="#examples-94">Examples</a></h5>
|
||
<p>Taking the first three elements of a slice:</p>
|
||
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_take)]
|
||
|
||
</span><span class="kw">let </span><span class="kw-2">mut </span>slice: <span class="kw-2">&</span>[<span class="kw">_</span>] = <span class="kw-2">&</span>[<span class="string">'a'</span>, <span class="string">'b'</span>, <span class="string">'c'</span>, <span class="string">'d'</span>];
|
||
<span class="kw">let </span><span class="kw-2">mut </span>first_three = slice.take(..<span class="number">3</span>).unwrap();
|
||
|
||
<span class="macro">assert_eq!</span>(slice, <span class="kw-2">&</span>[<span class="string">'d'</span>]);
|
||
<span class="macro">assert_eq!</span>(first_three, <span class="kw-2">&</span>[<span class="string">'a'</span>, <span class="string">'b'</span>, <span class="string">'c'</span>]);</code></pre></div>
|
||
<p>Taking the last two elements of a slice:</p>
|
||
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_take)]
|
||
|
||
</span><span class="kw">let </span><span class="kw-2">mut </span>slice: <span class="kw-2">&</span>[<span class="kw">_</span>] = <span class="kw-2">&</span>[<span class="string">'a'</span>, <span class="string">'b'</span>, <span class="string">'c'</span>, <span class="string">'d'</span>];
|
||
<span class="kw">let </span><span class="kw-2">mut </span>tail = slice.take(<span class="number">2</span>..).unwrap();
|
||
|
||
<span class="macro">assert_eq!</span>(slice, <span class="kw-2">&</span>[<span class="string">'a'</span>, <span class="string">'b'</span>]);
|
||
<span class="macro">assert_eq!</span>(tail, <span class="kw-2">&</span>[<span class="string">'c'</span>, <span class="string">'d'</span>]);</code></pre></div>
|
||
<p>Getting <code>None</code> when <code>range</code> is out of bounds:</p>
|
||
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_take)]
|
||
|
||
</span><span class="kw">let </span><span class="kw-2">mut </span>slice: <span class="kw-2">&</span>[<span class="kw">_</span>] = <span class="kw-2">&</span>[<span class="string">'a'</span>, <span class="string">'b'</span>, <span class="string">'c'</span>, <span class="string">'d'</span>];
|
||
|
||
<span class="macro">assert_eq!</span>(<span class="prelude-val">None</span>, slice.take(<span class="number">5</span>..));
|
||
<span class="macro">assert_eq!</span>(<span class="prelude-val">None</span>, slice.take(..<span class="number">5</span>));
|
||
<span class="macro">assert_eq!</span>(<span class="prelude-val">None</span>, slice.take(..=<span class="number">4</span>));
|
||
<span class="kw">let </span>expected: <span class="kw-2">&</span>[char] = <span class="kw-2">&</span>[<span class="string">'a'</span>, <span class="string">'b'</span>, <span class="string">'c'</span>, <span class="string">'d'</span>];
|
||
<span class="macro">assert_eq!</span>(<span class="prelude-val">Some</span>(expected), slice.take(..<span class="number">4</span>));</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.take_mut" class="method has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.67.0/src/core/slice/mod.rs.html#3970-3973">source</a><h4 class="code-header">pub fn <a href="#method.take_mut" class="fn">take_mut</a><R, 'a>(self: &mut &'a mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html">[T]</a>, range: R) -> <a class="enum" href="https://doc.rust-lang.org/1.67.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&'a mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html">[T]</a>><span class="where fmt-newline">where<br> R: <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/ops/range/trait.OneSidedRange.html" title="trait core::ops::range::OneSidedRange">OneSidedRange</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.usize.html">usize</a>>,</span></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_take</code>)</span></div></span></summary><div class="docblock"><p>Removes the subslice corresponding to the given range
|
||
and returns a mutable reference to it.</p>
|
||
<p>Returns <code>None</code> and does not modify the slice if the given
|
||
range is out of bounds.</p>
|
||
<p>Note that this method only accepts one-sided ranges such as
|
||
<code>2..</code> or <code>..6</code>, but not <code>2..6</code>.</p>
|
||
<h5 id="examples-95"><a href="#examples-95">Examples</a></h5>
|
||
<p>Taking the first three elements of a slice:</p>
|
||
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_take)]
|
||
|
||
</span><span class="kw">let </span><span class="kw-2">mut </span>slice: <span class="kw-2">&mut </span>[<span class="kw">_</span>] = <span class="kw-2">&mut </span>[<span class="string">'a'</span>, <span class="string">'b'</span>, <span class="string">'c'</span>, <span class="string">'d'</span>];
|
||
<span class="kw">let </span><span class="kw-2">mut </span>first_three = slice.take_mut(..<span class="number">3</span>).unwrap();
|
||
|
||
<span class="macro">assert_eq!</span>(slice, <span class="kw-2">&mut </span>[<span class="string">'d'</span>]);
|
||
<span class="macro">assert_eq!</span>(first_three, <span class="kw-2">&mut </span>[<span class="string">'a'</span>, <span class="string">'b'</span>, <span class="string">'c'</span>]);</code></pre></div>
|
||
<p>Taking the last two elements of a slice:</p>
|
||
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_take)]
|
||
|
||
</span><span class="kw">let </span><span class="kw-2">mut </span>slice: <span class="kw-2">&mut </span>[<span class="kw">_</span>] = <span class="kw-2">&mut </span>[<span class="string">'a'</span>, <span class="string">'b'</span>, <span class="string">'c'</span>, <span class="string">'d'</span>];
|
||
<span class="kw">let </span><span class="kw-2">mut </span>tail = slice.take_mut(<span class="number">2</span>..).unwrap();
|
||
|
||
<span class="macro">assert_eq!</span>(slice, <span class="kw-2">&mut </span>[<span class="string">'a'</span>, <span class="string">'b'</span>]);
|
||
<span class="macro">assert_eq!</span>(tail, <span class="kw-2">&mut </span>[<span class="string">'c'</span>, <span class="string">'d'</span>]);</code></pre></div>
|
||
<p>Getting <code>None</code> when <code>range</code> is out of bounds:</p>
|
||
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_take)]
|
||
|
||
</span><span class="kw">let </span><span class="kw-2">mut </span>slice: <span class="kw-2">&mut </span>[<span class="kw">_</span>] = <span class="kw-2">&mut </span>[<span class="string">'a'</span>, <span class="string">'b'</span>, <span class="string">'c'</span>, <span class="string">'d'</span>];
|
||
|
||
<span class="macro">assert_eq!</span>(<span class="prelude-val">None</span>, slice.take_mut(<span class="number">5</span>..));
|
||
<span class="macro">assert_eq!</span>(<span class="prelude-val">None</span>, slice.take_mut(..<span class="number">5</span>));
|
||
<span class="macro">assert_eq!</span>(<span class="prelude-val">None</span>, slice.take_mut(..=<span class="number">4</span>));
|
||
<span class="kw">let </span>expected: <span class="kw-2">&mut </span>[<span class="kw">_</span>] = <span class="kw-2">&mut </span>[<span class="string">'a'</span>, <span class="string">'b'</span>, <span class="string">'c'</span>, <span class="string">'d'</span>];
|
||
<span class="macro">assert_eq!</span>(<span class="prelude-val">Some</span>(expected), slice.take_mut(..<span class="number">4</span>));</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.take_first" class="method has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.67.0/src/core/slice/mod.rs.html#4009">source</a><h4 class="code-header">pub fn <a href="#method.take_first" class="fn">take_first</a><'a>(self: &mut &'a <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html">[T]</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.67.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.reference.html">&'a </a>T></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_take</code>)</span></div></span></summary><div class="docblock"><p>Removes the first element of the slice and returns a reference
|
||
to it.</p>
|
||
<p>Returns <code>None</code> if the slice is empty.</p>
|
||
<h5 id="examples-96"><a href="#examples-96">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_take)]
|
||
|
||
</span><span class="kw">let </span><span class="kw-2">mut </span>slice: <span class="kw-2">&</span>[<span class="kw">_</span>] = <span class="kw-2">&</span>[<span class="string">'a'</span>, <span class="string">'b'</span>, <span class="string">'c'</span>];
|
||
<span class="kw">let </span>first = slice.take_first().unwrap();
|
||
|
||
<span class="macro">assert_eq!</span>(slice, <span class="kw-2">&</span>[<span class="string">'b'</span>, <span class="string">'c'</span>]);
|
||
<span class="macro">assert_eq!</span>(first, <span class="kw-2">&</span><span class="string">'a'</span>);</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.take_first_mut" class="method has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.67.0/src/core/slice/mod.rs.html#4034">source</a><h4 class="code-header">pub fn <a href="#method.take_first_mut" class="fn">take_first_mut</a><'a>(self: &mut &'a mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html">[T]</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.67.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.reference.html">&'a mut </a>T></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_take</code>)</span></div></span></summary><div class="docblock"><p>Removes the first element of the slice and returns a mutable
|
||
reference to it.</p>
|
||
<p>Returns <code>None</code> if the slice is empty.</p>
|
||
<h5 id="examples-97"><a href="#examples-97">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_take)]
|
||
|
||
</span><span class="kw">let </span><span class="kw-2">mut </span>slice: <span class="kw-2">&mut </span>[<span class="kw">_</span>] = <span class="kw-2">&mut </span>[<span class="string">'a'</span>, <span class="string">'b'</span>, <span class="string">'c'</span>];
|
||
<span class="kw">let </span>first = slice.take_first_mut().unwrap();
|
||
<span class="kw-2">*</span>first = <span class="string">'d'</span>;
|
||
|
||
<span class="macro">assert_eq!</span>(slice, <span class="kw-2">&</span>[<span class="string">'b'</span>, <span class="string">'c'</span>]);
|
||
<span class="macro">assert_eq!</span>(first, <span class="kw-2">&</span><span class="string">'d'</span>);</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.take_last" class="method has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.67.0/src/core/slice/mod.rs.html#4058">source</a><h4 class="code-header">pub fn <a href="#method.take_last" class="fn">take_last</a><'a>(self: &mut &'a <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html">[T]</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.67.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.reference.html">&'a </a>T></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_take</code>)</span></div></span></summary><div class="docblock"><p>Removes the last element of the slice and returns a reference
|
||
to it.</p>
|
||
<p>Returns <code>None</code> if the slice is empty.</p>
|
||
<h5 id="examples-98"><a href="#examples-98">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_take)]
|
||
|
||
</span><span class="kw">let </span><span class="kw-2">mut </span>slice: <span class="kw-2">&</span>[<span class="kw">_</span>] = <span class="kw-2">&</span>[<span class="string">'a'</span>, <span class="string">'b'</span>, <span class="string">'c'</span>];
|
||
<span class="kw">let </span>last = slice.take_last().unwrap();
|
||
|
||
<span class="macro">assert_eq!</span>(slice, <span class="kw-2">&</span>[<span class="string">'a'</span>, <span class="string">'b'</span>]);
|
||
<span class="macro">assert_eq!</span>(last, <span class="kw-2">&</span><span class="string">'c'</span>);</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.take_last_mut" class="method has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.67.0/src/core/slice/mod.rs.html#4083">source</a><h4 class="code-header">pub fn <a href="#method.take_last_mut" class="fn">take_last_mut</a><'a>(self: &mut &'a mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html">[T]</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.67.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.reference.html">&'a mut </a>T></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_take</code>)</span></div></span></summary><div class="docblock"><p>Removes the last element of the slice and returns a mutable
|
||
reference to it.</p>
|
||
<p>Returns <code>None</code> if the slice is empty.</p>
|
||
<h5 id="examples-99"><a href="#examples-99">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_take)]
|
||
|
||
</span><span class="kw">let </span><span class="kw-2">mut </span>slice: <span class="kw-2">&mut </span>[<span class="kw">_</span>] = <span class="kw-2">&mut </span>[<span class="string">'a'</span>, <span class="string">'b'</span>, <span class="string">'c'</span>];
|
||
<span class="kw">let </span>last = slice.take_last_mut().unwrap();
|
||
<span class="kw-2">*</span>last = <span class="string">'d'</span>;
|
||
|
||
<span class="macro">assert_eq!</span>(slice, <span class="kw-2">&</span>[<span class="string">'a'</span>, <span class="string">'b'</span>]);
|
||
<span class="macro">assert_eq!</span>(last, <span class="kw-2">&</span><span class="string">'d'</span>);</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_many_unchecked_mut" class="method has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.67.0/src/core/slice/mod.rs.html#4117-4120">source</a><h4 class="code-header">pub unsafe fn <a href="#method.get_many_unchecked_mut" class="fn">get_many_unchecked_mut</a><const N: <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.usize.html">usize</a>>(<br> &mut self,<br> indices: [<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.usize.html">usize</a>; <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">N</a>]<br>) -> [<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.reference.html">&mut </a>T; <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">N</a>]</h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>get_many_mut</code>)</span></div></span></summary><div class="docblock"><p>Returns mutable references to many indices at once, without doing any checks.</p>
|
||
<p>For a safe alternative see <a href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html#method.get_many_mut"><code>get_many_mut</code></a>.</p>
|
||
<h5 id="safety-9"><a href="#safety-9">Safety</a></h5>
|
||
<p>Calling this method with overlapping or out-of-bounds indices is <em><a href="https://doc.rust-lang.org/reference/behavior-considered-undefined.html">undefined behavior</a></em>
|
||
even if the resulting references are not used.</p>
|
||
<h5 id="examples-100"><a href="#examples-100">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(get_many_mut)]
|
||
|
||
</span><span class="kw">let </span>x = <span class="kw-2">&mut </span>[<span class="number">1</span>, <span class="number">2</span>, <span class="number">4</span>];
|
||
|
||
<span class="kw">unsafe </span>{
|
||
<span class="kw">let </span>[a, b] = x.get_many_unchecked_mut([<span class="number">0</span>, <span class="number">2</span>]);
|
||
<span class="kw-2">*</span>a <span class="kw-2">*</span>= <span class="number">10</span>;
|
||
<span class="kw-2">*</span>b <span class="kw-2">*</span>= <span class="number">100</span>;
|
||
}
|
||
<span class="macro">assert_eq!</span>(x, <span class="kw-2">&</span>[<span class="number">10</span>, <span class="number">2</span>, <span class="number">400</span>]);</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.get_many_mut" class="method has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.67.0/src/core/slice/mod.rs.html#4159-4162">source</a><h4 class="code-header">pub fn <a href="#method.get_many_mut" class="fn">get_many_mut</a><const N: <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.usize.html">usize</a>>(<br> &mut self,<br> indices: [<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.usize.html">usize</a>; <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">N</a>]<br>) -> <a class="enum" href="https://doc.rust-lang.org/1.67.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><[<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.reference.html">&mut </a>T; <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">N</a>], <a class="struct" href="https://doc.rust-lang.org/1.67.0/core/slice/struct.GetManyMutError.html" title="struct core::slice::GetManyMutError">GetManyMutError</a><N>></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>get_many_mut</code>)</span></div></span></summary><div class="docblock"><p>Returns mutable references to many indices at once.</p>
|
||
<p>Returns an error if any index is out-of-bounds, or if the same index was
|
||
passed more than once.</p>
|
||
<h5 id="examples-101"><a href="#examples-101">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(get_many_mut)]
|
||
|
||
</span><span class="kw">let </span>v = <span class="kw-2">&mut </span>[<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>];
|
||
<span class="kw">if let </span><span class="prelude-val">Ok</span>([a, b]) = v.get_many_mut([<span class="number">0</span>, <span class="number">2</span>]) {
|
||
<span class="kw-2">*</span>a = <span class="number">413</span>;
|
||
<span class="kw-2">*</span>b = <span class="number">612</span>;
|
||
}
|
||
<span class="macro">assert_eq!</span>(v, <span class="kw-2">&</span>[<span class="number">413</span>, <span class="number">2</span>, <span class="number">612</span>]);</code></pre></div>
|
||
</div></details></div><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sort_floats-1" class="method has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.67.0/src/core/slice/mod.rs.html#4277">source</a><h4 class="code-header">pub fn <a href="#method.sort_floats-1" class="fn">sort_floats</a>(&mut self)</h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>sort_floats</code>)</span></div></span></summary><div class="docblock"><p>Sorts the slice of floats.</p>
|
||
<p>This sort is in-place (i.e. does not allocate), <em>O</em>(<em>n</em> * log(<em>n</em>)) worst-case, and uses
|
||
the ordering defined by <a href="https://doc.rust-lang.org/1.67.0/core/primitive.f32.html#method.total_cmp" title="f32::total_cmp"><code>f32::total_cmp</code></a>.</p>
|
||
<h5 id="current-implementation-7"><a href="#current-implementation-7">Current implementation</a></h5>
|
||
<p>This uses the same sorting algorithm as <a href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html#method.sort_unstable_by"><code>sort_unstable_by</code></a>.</p>
|
||
<h5 id="examples-102"><a href="#examples-102">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(sort_floats)]
|
||
</span><span class="kw">let </span><span class="kw-2">mut </span>v = [<span class="number">2.6</span>, -<span class="number">5e-8</span>, f32::NAN, <span class="number">8.29</span>, f32::INFINITY, -<span class="number">1.0</span>, <span class="number">0.0</span>, -f32::INFINITY, -<span class="number">0.0</span>];
|
||
|
||
v.sort_floats();
|
||
<span class="kw">let </span>sorted = [-f32::INFINITY, -<span class="number">1.0</span>, -<span class="number">5e-8</span>, -<span class="number">0.0</span>, <span class="number">0.0</span>, <span class="number">2.6</span>, <span class="number">8.29</span>, f32::INFINITY, f32::NAN];
|
||
<span class="macro">assert_eq!</span>(<span class="kw-2">&</span>v[..<span class="number">8</span>], <span class="kw-2">&</span>sorted[..<span class="number">8</span>]);
|
||
<span class="macro">assert!</span>(v[<span class="number">8</span>].is_nan());</code></pre></div>
|
||
</div></details></div><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.flatten" class="method has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.67.0/src/core/slice/mod.rs.html#4202">source</a><h4 class="code-header">pub fn <a href="#method.flatten" class="fn">flatten</a>(&self) -> &<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html">[T]</a></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_flatten</code>)</span></div></span></summary><div class="docblock"><p>Takes a <code>&[[T; N]]</code>, and flattens it to a <code>&[T]</code>.</p>
|
||
<h5 id="panics-34"><a href="#panics-34">Panics</a></h5>
|
||
<p>This panics if the length of the resulting slice would overflow a <code>usize</code>.</p>
|
||
<p>This is only possible when flattening a slice of arrays of zero-sized
|
||
types, and thus tends to be irrelevant in practice. If
|
||
<code>size_of::<T>() > 0</code>, this will never panic.</p>
|
||
<h5 id="examples-103"><a href="#examples-103">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_flatten)]
|
||
|
||
</span><span class="macro">assert_eq!</span>([[<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>], [<span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>]].flatten(), <span class="kw-2">&</span>[<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>]);
|
||
|
||
<span class="macro">assert_eq!</span>(
|
||
[[<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>], [<span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>]].flatten(),
|
||
[[<span class="number">1</span>, <span class="number">2</span>], [<span class="number">3</span>, <span class="number">4</span>], [<span class="number">5</span>, <span class="number">6</span>]].flatten(),
|
||
);
|
||
|
||
<span class="kw">let </span>slice_of_empty_arrays: <span class="kw-2">&</span>[[i32; <span class="number">0</span>]] = <span class="kw-2">&</span>[[], [], [], [], []];
|
||
<span class="macro">assert!</span>(slice_of_empty_arrays.flatten().is_empty());
|
||
|
||
<span class="kw">let </span>empty_slice_of_arrays: <span class="kw-2">&</span>[[u32; <span class="number">10</span>]] = <span class="kw-2">&</span>[];
|
||
<span class="macro">assert!</span>(empty_slice_of_arrays.flatten().is_empty());</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.flatten_mut" class="method has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.67.0/src/core/slice/mod.rs.html#4240">source</a><h4 class="code-header">pub fn <a href="#method.flatten_mut" class="fn">flatten_mut</a>(&mut self) -> &mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html">[T]</a></h4></section><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>slice_flatten</code>)</span></div></span></summary><div class="docblock"><p>Takes a <code>&mut [[T; N]]</code>, and flattens it to a <code>&mut [T]</code>.</p>
|
||
<h5 id="panics-35"><a href="#panics-35">Panics</a></h5>
|
||
<p>This panics if the length of the resulting slice would overflow a <code>usize</code>.</p>
|
||
<p>This is only possible when flattening a slice of arrays of zero-sized
|
||
types, and thus tends to be irrelevant in practice. If
|
||
<code>size_of::<T>() > 0</code>, this will never panic.</p>
|
||
<h5 id="examples-104"><a href="#examples-104">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#![feature(slice_flatten)]
|
||
|
||
</span><span class="kw">fn </span>add_5_to_all(slice: <span class="kw-2">&mut </span>[i32]) {
|
||
<span class="kw">for </span>i <span class="kw">in </span>slice {
|
||
<span class="kw-2">*</span>i += <span class="number">5</span>;
|
||
}
|
||
}
|
||
|
||
<span class="kw">let </span><span class="kw-2">mut </span>array = [[<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>], [<span class="number">4</span>, <span class="number">5</span>, <span class="number">6</span>], [<span class="number">7</span>, <span class="number">8</span>, <span class="number">9</span>]];
|
||
add_5_to_all(array.flatten_mut());
|
||
<span class="macro">assert_eq!</span>(array, [[<span class="number">6</span>, <span class="number">7</span>, <span class="number">8</span>], [<span class="number">9</span>, <span class="number">10</span>, <span class="number">11</span>], [<span class="number">12</span>, <span class="number">13</span>, <span class="number">14</span>]]);</code></pre></div>
|
||
</div></details></div></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor">§</a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-AsMut%3C%5BT%3B%201%5D%3E-for-GenericArray%3CT%2C%20U1%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-AsMut%3C%5BT%3B%201%5D%3E-for-GenericArray%3CT%2C%20U1%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsMut.html" title="trait core::convert::AsMut">AsMut</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 1]</a>> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U1.html" title="type typenum::generated::consts::U1">U1</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_mut-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.as_mut-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsMut.html#tymethod.as_mut" class="fn">as_mut</a>(&mut self) -> &mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 1]</a></h4></section></summary><div class='docblock'>Converts this type into a mutable reference of the (usually inferred) input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-AsMut%3C%5BT%3B%2010%5D%3E-for-GenericArray%3CT%2C%20U10%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-AsMut%3C%5BT%3B%2010%5D%3E-for-GenericArray%3CT%2C%20U10%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsMut.html" title="trait core::convert::AsMut">AsMut</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 10]</a>> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U10.html" title="type typenum::generated::consts::U10">U10</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_mut-10" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.as_mut-10" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsMut.html#tymethod.as_mut" class="fn">as_mut</a>(&mut self) -> &mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 10]</a></h4></section></summary><div class='docblock'>Converts this type into a mutable reference of the (usually inferred) input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-AsMut%3C%5BT%3B%2011%5D%3E-for-GenericArray%3CT%2C%20U11%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-AsMut%3C%5BT%3B%2011%5D%3E-for-GenericArray%3CT%2C%20U11%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsMut.html" title="trait core::convert::AsMut">AsMut</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 11]</a>> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U11.html" title="type typenum::generated::consts::U11">U11</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_mut-11" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.as_mut-11" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsMut.html#tymethod.as_mut" class="fn">as_mut</a>(&mut self) -> &mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 11]</a></h4></section></summary><div class='docblock'>Converts this type into a mutable reference of the (usually inferred) input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-AsMut%3C%5BT%3B%2012%5D%3E-for-GenericArray%3CT%2C%20U12%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-AsMut%3C%5BT%3B%2012%5D%3E-for-GenericArray%3CT%2C%20U12%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsMut.html" title="trait core::convert::AsMut">AsMut</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 12]</a>> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U12.html" title="type typenum::generated::consts::U12">U12</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_mut-12" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.as_mut-12" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsMut.html#tymethod.as_mut" class="fn">as_mut</a>(&mut self) -> &mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 12]</a></h4></section></summary><div class='docblock'>Converts this type into a mutable reference of the (usually inferred) input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-AsMut%3C%5BT%3B%2013%5D%3E-for-GenericArray%3CT%2C%20U13%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-AsMut%3C%5BT%3B%2013%5D%3E-for-GenericArray%3CT%2C%20U13%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsMut.html" title="trait core::convert::AsMut">AsMut</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 13]</a>> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U13.html" title="type typenum::generated::consts::U13">U13</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_mut-13" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.as_mut-13" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsMut.html#tymethod.as_mut" class="fn">as_mut</a>(&mut self) -> &mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 13]</a></h4></section></summary><div class='docblock'>Converts this type into a mutable reference of the (usually inferred) input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-AsMut%3C%5BT%3B%2014%5D%3E-for-GenericArray%3CT%2C%20U14%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-AsMut%3C%5BT%3B%2014%5D%3E-for-GenericArray%3CT%2C%20U14%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsMut.html" title="trait core::convert::AsMut">AsMut</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 14]</a>> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U14.html" title="type typenum::generated::consts::U14">U14</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_mut-14" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.as_mut-14" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsMut.html#tymethod.as_mut" class="fn">as_mut</a>(&mut self) -> &mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 14]</a></h4></section></summary><div class='docblock'>Converts this type into a mutable reference of the (usually inferred) input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-AsMut%3C%5BT%3B%2015%5D%3E-for-GenericArray%3CT%2C%20U15%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-AsMut%3C%5BT%3B%2015%5D%3E-for-GenericArray%3CT%2C%20U15%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsMut.html" title="trait core::convert::AsMut">AsMut</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 15]</a>> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U15.html" title="type typenum::generated::consts::U15">U15</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_mut-15" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.as_mut-15" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsMut.html#tymethod.as_mut" class="fn">as_mut</a>(&mut self) -> &mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 15]</a></h4></section></summary><div class='docblock'>Converts this type into a mutable reference of the (usually inferred) input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-AsMut%3C%5BT%3B%2016%5D%3E-for-GenericArray%3CT%2C%20U16%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-AsMut%3C%5BT%3B%2016%5D%3E-for-GenericArray%3CT%2C%20U16%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsMut.html" title="trait core::convert::AsMut">AsMut</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 16]</a>> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U16.html" title="type typenum::generated::consts::U16">U16</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_mut-16" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.as_mut-16" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsMut.html#tymethod.as_mut" class="fn">as_mut</a>(&mut self) -> &mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 16]</a></h4></section></summary><div class='docblock'>Converts this type into a mutable reference of the (usually inferred) input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-AsMut%3C%5BT%3B%2017%5D%3E-for-GenericArray%3CT%2C%20U17%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-AsMut%3C%5BT%3B%2017%5D%3E-for-GenericArray%3CT%2C%20U17%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsMut.html" title="trait core::convert::AsMut">AsMut</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 17]</a>> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U17.html" title="type typenum::generated::consts::U17">U17</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_mut-17" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.as_mut-17" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsMut.html#tymethod.as_mut" class="fn">as_mut</a>(&mut self) -> &mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 17]</a></h4></section></summary><div class='docblock'>Converts this type into a mutable reference of the (usually inferred) input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-AsMut%3C%5BT%3B%2018%5D%3E-for-GenericArray%3CT%2C%20U18%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-AsMut%3C%5BT%3B%2018%5D%3E-for-GenericArray%3CT%2C%20U18%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsMut.html" title="trait core::convert::AsMut">AsMut</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 18]</a>> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U18.html" title="type typenum::generated::consts::U18">U18</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_mut-18" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.as_mut-18" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsMut.html#tymethod.as_mut" class="fn">as_mut</a>(&mut self) -> &mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 18]</a></h4></section></summary><div class='docblock'>Converts this type into a mutable reference of the (usually inferred) input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-AsMut%3C%5BT%3B%2019%5D%3E-for-GenericArray%3CT%2C%20U19%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-AsMut%3C%5BT%3B%2019%5D%3E-for-GenericArray%3CT%2C%20U19%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsMut.html" title="trait core::convert::AsMut">AsMut</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 19]</a>> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U19.html" title="type typenum::generated::consts::U19">U19</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_mut-19" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.as_mut-19" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsMut.html#tymethod.as_mut" class="fn">as_mut</a>(&mut self) -> &mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 19]</a></h4></section></summary><div class='docblock'>Converts this type into a mutable reference of the (usually inferred) input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-AsMut%3C%5BT%3B%202%5D%3E-for-GenericArray%3CT%2C%20U2%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-AsMut%3C%5BT%3B%202%5D%3E-for-GenericArray%3CT%2C%20U2%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsMut.html" title="trait core::convert::AsMut">AsMut</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 2]</a>> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U2.html" title="type typenum::generated::consts::U2">U2</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_mut-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.as_mut-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsMut.html#tymethod.as_mut" class="fn">as_mut</a>(&mut self) -> &mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 2]</a></h4></section></summary><div class='docblock'>Converts this type into a mutable reference of the (usually inferred) input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-AsMut%3C%5BT%3B%2020%5D%3E-for-GenericArray%3CT%2C%20U20%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-AsMut%3C%5BT%3B%2020%5D%3E-for-GenericArray%3CT%2C%20U20%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsMut.html" title="trait core::convert::AsMut">AsMut</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 20]</a>> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U20.html" title="type typenum::generated::consts::U20">U20</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_mut-20" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.as_mut-20" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsMut.html#tymethod.as_mut" class="fn">as_mut</a>(&mut self) -> &mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 20]</a></h4></section></summary><div class='docblock'>Converts this type into a mutable reference of the (usually inferred) input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-AsMut%3C%5BT%3B%2021%5D%3E-for-GenericArray%3CT%2C%20U21%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-AsMut%3C%5BT%3B%2021%5D%3E-for-GenericArray%3CT%2C%20U21%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsMut.html" title="trait core::convert::AsMut">AsMut</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 21]</a>> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U21.html" title="type typenum::generated::consts::U21">U21</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_mut-21" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.as_mut-21" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsMut.html#tymethod.as_mut" class="fn">as_mut</a>(&mut self) -> &mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 21]</a></h4></section></summary><div class='docblock'>Converts this type into a mutable reference of the (usually inferred) input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-AsMut%3C%5BT%3B%2022%5D%3E-for-GenericArray%3CT%2C%20U22%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-AsMut%3C%5BT%3B%2022%5D%3E-for-GenericArray%3CT%2C%20U22%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsMut.html" title="trait core::convert::AsMut">AsMut</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 22]</a>> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U22.html" title="type typenum::generated::consts::U22">U22</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_mut-22" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.as_mut-22" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsMut.html#tymethod.as_mut" class="fn">as_mut</a>(&mut self) -> &mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 22]</a></h4></section></summary><div class='docblock'>Converts this type into a mutable reference of the (usually inferred) input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-AsMut%3C%5BT%3B%2023%5D%3E-for-GenericArray%3CT%2C%20U23%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-AsMut%3C%5BT%3B%2023%5D%3E-for-GenericArray%3CT%2C%20U23%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsMut.html" title="trait core::convert::AsMut">AsMut</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 23]</a>> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U23.html" title="type typenum::generated::consts::U23">U23</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_mut-23" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.as_mut-23" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsMut.html#tymethod.as_mut" class="fn">as_mut</a>(&mut self) -> &mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 23]</a></h4></section></summary><div class='docblock'>Converts this type into a mutable reference of the (usually inferred) input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-AsMut%3C%5BT%3B%2024%5D%3E-for-GenericArray%3CT%2C%20U24%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-AsMut%3C%5BT%3B%2024%5D%3E-for-GenericArray%3CT%2C%20U24%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsMut.html" title="trait core::convert::AsMut">AsMut</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 24]</a>> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U24.html" title="type typenum::generated::consts::U24">U24</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_mut-24" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.as_mut-24" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsMut.html#tymethod.as_mut" class="fn">as_mut</a>(&mut self) -> &mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 24]</a></h4></section></summary><div class='docblock'>Converts this type into a mutable reference of the (usually inferred) input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-AsMut%3C%5BT%3B%2025%5D%3E-for-GenericArray%3CT%2C%20U25%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-AsMut%3C%5BT%3B%2025%5D%3E-for-GenericArray%3CT%2C%20U25%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsMut.html" title="trait core::convert::AsMut">AsMut</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 25]</a>> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U25.html" title="type typenum::generated::consts::U25">U25</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_mut-25" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.as_mut-25" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsMut.html#tymethod.as_mut" class="fn">as_mut</a>(&mut self) -> &mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 25]</a></h4></section></summary><div class='docblock'>Converts this type into a mutable reference of the (usually inferred) input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-AsMut%3C%5BT%3B%2026%5D%3E-for-GenericArray%3CT%2C%20U26%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-AsMut%3C%5BT%3B%2026%5D%3E-for-GenericArray%3CT%2C%20U26%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsMut.html" title="trait core::convert::AsMut">AsMut</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 26]</a>> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U26.html" title="type typenum::generated::consts::U26">U26</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_mut-26" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.as_mut-26" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsMut.html#tymethod.as_mut" class="fn">as_mut</a>(&mut self) -> &mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 26]</a></h4></section></summary><div class='docblock'>Converts this type into a mutable reference of the (usually inferred) input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-AsMut%3C%5BT%3B%2027%5D%3E-for-GenericArray%3CT%2C%20U27%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-AsMut%3C%5BT%3B%2027%5D%3E-for-GenericArray%3CT%2C%20U27%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsMut.html" title="trait core::convert::AsMut">AsMut</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 27]</a>> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U27.html" title="type typenum::generated::consts::U27">U27</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_mut-27" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.as_mut-27" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsMut.html#tymethod.as_mut" class="fn">as_mut</a>(&mut self) -> &mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 27]</a></h4></section></summary><div class='docblock'>Converts this type into a mutable reference of the (usually inferred) input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-AsMut%3C%5BT%3B%2028%5D%3E-for-GenericArray%3CT%2C%20U28%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-AsMut%3C%5BT%3B%2028%5D%3E-for-GenericArray%3CT%2C%20U28%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsMut.html" title="trait core::convert::AsMut">AsMut</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 28]</a>> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U28.html" title="type typenum::generated::consts::U28">U28</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_mut-28" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.as_mut-28" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsMut.html#tymethod.as_mut" class="fn">as_mut</a>(&mut self) -> &mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 28]</a></h4></section></summary><div class='docblock'>Converts this type into a mutable reference of the (usually inferred) input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-AsMut%3C%5BT%3B%2029%5D%3E-for-GenericArray%3CT%2C%20U29%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-AsMut%3C%5BT%3B%2029%5D%3E-for-GenericArray%3CT%2C%20U29%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsMut.html" title="trait core::convert::AsMut">AsMut</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 29]</a>> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U29.html" title="type typenum::generated::consts::U29">U29</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_mut-29" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.as_mut-29" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsMut.html#tymethod.as_mut" class="fn">as_mut</a>(&mut self) -> &mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 29]</a></h4></section></summary><div class='docblock'>Converts this type into a mutable reference of the (usually inferred) input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-AsMut%3C%5BT%3B%203%5D%3E-for-GenericArray%3CT%2C%20U3%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-AsMut%3C%5BT%3B%203%5D%3E-for-GenericArray%3CT%2C%20U3%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsMut.html" title="trait core::convert::AsMut">AsMut</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 3]</a>> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U3.html" title="type typenum::generated::consts::U3">U3</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_mut-3" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.as_mut-3" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsMut.html#tymethod.as_mut" class="fn">as_mut</a>(&mut self) -> &mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 3]</a></h4></section></summary><div class='docblock'>Converts this type into a mutable reference of the (usually inferred) input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-AsMut%3C%5BT%3B%2030%5D%3E-for-GenericArray%3CT%2C%20U30%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-AsMut%3C%5BT%3B%2030%5D%3E-for-GenericArray%3CT%2C%20U30%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsMut.html" title="trait core::convert::AsMut">AsMut</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 30]</a>> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U30.html" title="type typenum::generated::consts::U30">U30</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_mut-30" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.as_mut-30" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsMut.html#tymethod.as_mut" class="fn">as_mut</a>(&mut self) -> &mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 30]</a></h4></section></summary><div class='docblock'>Converts this type into a mutable reference of the (usually inferred) input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-AsMut%3C%5BT%3B%2031%5D%3E-for-GenericArray%3CT%2C%20U31%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-AsMut%3C%5BT%3B%2031%5D%3E-for-GenericArray%3CT%2C%20U31%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsMut.html" title="trait core::convert::AsMut">AsMut</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 31]</a>> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U31.html" title="type typenum::generated::consts::U31">U31</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_mut-31" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.as_mut-31" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsMut.html#tymethod.as_mut" class="fn">as_mut</a>(&mut self) -> &mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 31]</a></h4></section></summary><div class='docblock'>Converts this type into a mutable reference of the (usually inferred) input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-AsMut%3C%5BT%3B%2032%5D%3E-for-GenericArray%3CT%2C%20U32%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-AsMut%3C%5BT%3B%2032%5D%3E-for-GenericArray%3CT%2C%20U32%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsMut.html" title="trait core::convert::AsMut">AsMut</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 32]</a>> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U32.html" title="type typenum::generated::consts::U32">U32</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_mut-32" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.as_mut-32" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsMut.html#tymethod.as_mut" class="fn">as_mut</a>(&mut self) -> &mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 32]</a></h4></section></summary><div class='docblock'>Converts this type into a mutable reference of the (usually inferred) input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-AsMut%3C%5BT%3B%204%5D%3E-for-GenericArray%3CT%2C%20U4%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-AsMut%3C%5BT%3B%204%5D%3E-for-GenericArray%3CT%2C%20U4%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsMut.html" title="trait core::convert::AsMut">AsMut</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 4]</a>> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U4.html" title="type typenum::generated::consts::U4">U4</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_mut-4" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.as_mut-4" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsMut.html#tymethod.as_mut" class="fn">as_mut</a>(&mut self) -> &mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 4]</a></h4></section></summary><div class='docblock'>Converts this type into a mutable reference of the (usually inferred) input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-AsMut%3C%5BT%3B%205%5D%3E-for-GenericArray%3CT%2C%20U5%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-AsMut%3C%5BT%3B%205%5D%3E-for-GenericArray%3CT%2C%20U5%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsMut.html" title="trait core::convert::AsMut">AsMut</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 5]</a>> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U5.html" title="type typenum::generated::consts::U5">U5</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_mut-5" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.as_mut-5" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsMut.html#tymethod.as_mut" class="fn">as_mut</a>(&mut self) -> &mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 5]</a></h4></section></summary><div class='docblock'>Converts this type into a mutable reference of the (usually inferred) input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-AsMut%3C%5BT%3B%206%5D%3E-for-GenericArray%3CT%2C%20U6%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-AsMut%3C%5BT%3B%206%5D%3E-for-GenericArray%3CT%2C%20U6%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsMut.html" title="trait core::convert::AsMut">AsMut</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 6]</a>> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U6.html" title="type typenum::generated::consts::U6">U6</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_mut-6" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.as_mut-6" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsMut.html#tymethod.as_mut" class="fn">as_mut</a>(&mut self) -> &mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 6]</a></h4></section></summary><div class='docblock'>Converts this type into a mutable reference of the (usually inferred) input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-AsMut%3C%5BT%3B%207%5D%3E-for-GenericArray%3CT%2C%20U7%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-AsMut%3C%5BT%3B%207%5D%3E-for-GenericArray%3CT%2C%20U7%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsMut.html" title="trait core::convert::AsMut">AsMut</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 7]</a>> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U7.html" title="type typenum::generated::consts::U7">U7</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_mut-7" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.as_mut-7" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsMut.html#tymethod.as_mut" class="fn">as_mut</a>(&mut self) -> &mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 7]</a></h4></section></summary><div class='docblock'>Converts this type into a mutable reference of the (usually inferred) input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-AsMut%3C%5BT%3B%208%5D%3E-for-GenericArray%3CT%2C%20U8%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-AsMut%3C%5BT%3B%208%5D%3E-for-GenericArray%3CT%2C%20U8%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsMut.html" title="trait core::convert::AsMut">AsMut</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 8]</a>> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U8.html" title="type typenum::generated::consts::U8">U8</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_mut-8" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.as_mut-8" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsMut.html#tymethod.as_mut" class="fn">as_mut</a>(&mut self) -> &mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 8]</a></h4></section></summary><div class='docblock'>Converts this type into a mutable reference of the (usually inferred) input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-AsMut%3C%5BT%3B%209%5D%3E-for-GenericArray%3CT%2C%20U9%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-AsMut%3C%5BT%3B%209%5D%3E-for-GenericArray%3CT%2C%20U9%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsMut.html" title="trait core::convert::AsMut">AsMut</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 9]</a>> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U9.html" title="type typenum::generated::consts::U9">U9</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_mut-9" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.as_mut-9" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsMut.html#tymethod.as_mut" class="fn">as_mut</a>(&mut self) -> &mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 9]</a></h4></section></summary><div class='docblock'>Converts this type into a mutable reference of the (usually inferred) input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-AsMut%3C%5BT%5D%3E-for-GenericArray%3CT%2C%20N%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#104-112">source</a><a href="#impl-AsMut%3C%5BT%5D%3E-for-GenericArray%3CT%2C%20N%3E" class="anchor">§</a><h3 class="code-header">impl<T, N> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsMut.html" title="trait core::convert::AsMut">AsMut</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html">[T]</a>> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, N><span class="where fmt-newline">where<br> N: <a class="trait" href="trait.ArrayLength.html" title="trait generic_array::ArrayLength">ArrayLength</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_mut" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#109-111">source</a><a href="#method.as_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsMut.html#tymethod.as_mut" class="fn">as_mut</a>(&mut self) -> &mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html">[T]</a></h4></section></summary><div class='docblock'>Converts this type into a mutable reference of the (usually inferred) input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-AsRef%3C%5BT%3B%201%5D%3E-for-GenericArray%3CT%2C%20U1%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-AsRef%3C%5BT%3B%201%5D%3E-for-GenericArray%3CT%2C%20U1%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 1]</a>> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U1.html" title="type typenum::generated::consts::U1">U1</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_ref-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.as_ref-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsRef.html#tymethod.as_ref" class="fn">as_ref</a>(&self) -> &<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 1]</a></h4></section></summary><div class='docblock'>Converts this type into a shared reference of the (usually inferred) input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-AsRef%3C%5BT%3B%2010%5D%3E-for-GenericArray%3CT%2C%20U10%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-AsRef%3C%5BT%3B%2010%5D%3E-for-GenericArray%3CT%2C%20U10%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 10]</a>> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U10.html" title="type typenum::generated::consts::U10">U10</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_ref-10" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.as_ref-10" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsRef.html#tymethod.as_ref" class="fn">as_ref</a>(&self) -> &<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 10]</a></h4></section></summary><div class='docblock'>Converts this type into a shared reference of the (usually inferred) input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-AsRef%3C%5BT%3B%2011%5D%3E-for-GenericArray%3CT%2C%20U11%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-AsRef%3C%5BT%3B%2011%5D%3E-for-GenericArray%3CT%2C%20U11%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 11]</a>> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U11.html" title="type typenum::generated::consts::U11">U11</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_ref-11" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.as_ref-11" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsRef.html#tymethod.as_ref" class="fn">as_ref</a>(&self) -> &<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 11]</a></h4></section></summary><div class='docblock'>Converts this type into a shared reference of the (usually inferred) input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-AsRef%3C%5BT%3B%2012%5D%3E-for-GenericArray%3CT%2C%20U12%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-AsRef%3C%5BT%3B%2012%5D%3E-for-GenericArray%3CT%2C%20U12%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 12]</a>> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U12.html" title="type typenum::generated::consts::U12">U12</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_ref-12" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.as_ref-12" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsRef.html#tymethod.as_ref" class="fn">as_ref</a>(&self) -> &<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 12]</a></h4></section></summary><div class='docblock'>Converts this type into a shared reference of the (usually inferred) input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-AsRef%3C%5BT%3B%2013%5D%3E-for-GenericArray%3CT%2C%20U13%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-AsRef%3C%5BT%3B%2013%5D%3E-for-GenericArray%3CT%2C%20U13%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 13]</a>> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U13.html" title="type typenum::generated::consts::U13">U13</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_ref-13" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.as_ref-13" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsRef.html#tymethod.as_ref" class="fn">as_ref</a>(&self) -> &<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 13]</a></h4></section></summary><div class='docblock'>Converts this type into a shared reference of the (usually inferred) input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-AsRef%3C%5BT%3B%2014%5D%3E-for-GenericArray%3CT%2C%20U14%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-AsRef%3C%5BT%3B%2014%5D%3E-for-GenericArray%3CT%2C%20U14%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 14]</a>> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U14.html" title="type typenum::generated::consts::U14">U14</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_ref-14" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.as_ref-14" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsRef.html#tymethod.as_ref" class="fn">as_ref</a>(&self) -> &<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 14]</a></h4></section></summary><div class='docblock'>Converts this type into a shared reference of the (usually inferred) input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-AsRef%3C%5BT%3B%2015%5D%3E-for-GenericArray%3CT%2C%20U15%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-AsRef%3C%5BT%3B%2015%5D%3E-for-GenericArray%3CT%2C%20U15%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 15]</a>> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U15.html" title="type typenum::generated::consts::U15">U15</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_ref-15" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.as_ref-15" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsRef.html#tymethod.as_ref" class="fn">as_ref</a>(&self) -> &<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 15]</a></h4></section></summary><div class='docblock'>Converts this type into a shared reference of the (usually inferred) input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-AsRef%3C%5BT%3B%2016%5D%3E-for-GenericArray%3CT%2C%20U16%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-AsRef%3C%5BT%3B%2016%5D%3E-for-GenericArray%3CT%2C%20U16%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 16]</a>> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U16.html" title="type typenum::generated::consts::U16">U16</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_ref-16" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.as_ref-16" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsRef.html#tymethod.as_ref" class="fn">as_ref</a>(&self) -> &<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 16]</a></h4></section></summary><div class='docblock'>Converts this type into a shared reference of the (usually inferred) input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-AsRef%3C%5BT%3B%2017%5D%3E-for-GenericArray%3CT%2C%20U17%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-AsRef%3C%5BT%3B%2017%5D%3E-for-GenericArray%3CT%2C%20U17%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 17]</a>> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U17.html" title="type typenum::generated::consts::U17">U17</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_ref-17" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.as_ref-17" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsRef.html#tymethod.as_ref" class="fn">as_ref</a>(&self) -> &<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 17]</a></h4></section></summary><div class='docblock'>Converts this type into a shared reference of the (usually inferred) input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-AsRef%3C%5BT%3B%2018%5D%3E-for-GenericArray%3CT%2C%20U18%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-AsRef%3C%5BT%3B%2018%5D%3E-for-GenericArray%3CT%2C%20U18%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 18]</a>> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U18.html" title="type typenum::generated::consts::U18">U18</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_ref-18" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.as_ref-18" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsRef.html#tymethod.as_ref" class="fn">as_ref</a>(&self) -> &<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 18]</a></h4></section></summary><div class='docblock'>Converts this type into a shared reference of the (usually inferred) input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-AsRef%3C%5BT%3B%2019%5D%3E-for-GenericArray%3CT%2C%20U19%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-AsRef%3C%5BT%3B%2019%5D%3E-for-GenericArray%3CT%2C%20U19%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 19]</a>> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U19.html" title="type typenum::generated::consts::U19">U19</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_ref-19" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.as_ref-19" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsRef.html#tymethod.as_ref" class="fn">as_ref</a>(&self) -> &<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 19]</a></h4></section></summary><div class='docblock'>Converts this type into a shared reference of the (usually inferred) input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-AsRef%3C%5BT%3B%202%5D%3E-for-GenericArray%3CT%2C%20U2%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-AsRef%3C%5BT%3B%202%5D%3E-for-GenericArray%3CT%2C%20U2%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 2]</a>> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U2.html" title="type typenum::generated::consts::U2">U2</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_ref-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.as_ref-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsRef.html#tymethod.as_ref" class="fn">as_ref</a>(&self) -> &<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 2]</a></h4></section></summary><div class='docblock'>Converts this type into a shared reference of the (usually inferred) input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-AsRef%3C%5BT%3B%2020%5D%3E-for-GenericArray%3CT%2C%20U20%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-AsRef%3C%5BT%3B%2020%5D%3E-for-GenericArray%3CT%2C%20U20%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 20]</a>> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U20.html" title="type typenum::generated::consts::U20">U20</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_ref-20" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.as_ref-20" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsRef.html#tymethod.as_ref" class="fn">as_ref</a>(&self) -> &<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 20]</a></h4></section></summary><div class='docblock'>Converts this type into a shared reference of the (usually inferred) input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-AsRef%3C%5BT%3B%2021%5D%3E-for-GenericArray%3CT%2C%20U21%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-AsRef%3C%5BT%3B%2021%5D%3E-for-GenericArray%3CT%2C%20U21%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 21]</a>> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U21.html" title="type typenum::generated::consts::U21">U21</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_ref-21" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.as_ref-21" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsRef.html#tymethod.as_ref" class="fn">as_ref</a>(&self) -> &<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 21]</a></h4></section></summary><div class='docblock'>Converts this type into a shared reference of the (usually inferred) input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-AsRef%3C%5BT%3B%2022%5D%3E-for-GenericArray%3CT%2C%20U22%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-AsRef%3C%5BT%3B%2022%5D%3E-for-GenericArray%3CT%2C%20U22%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 22]</a>> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U22.html" title="type typenum::generated::consts::U22">U22</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_ref-22" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.as_ref-22" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsRef.html#tymethod.as_ref" class="fn">as_ref</a>(&self) -> &<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 22]</a></h4></section></summary><div class='docblock'>Converts this type into a shared reference of the (usually inferred) input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-AsRef%3C%5BT%3B%2023%5D%3E-for-GenericArray%3CT%2C%20U23%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-AsRef%3C%5BT%3B%2023%5D%3E-for-GenericArray%3CT%2C%20U23%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 23]</a>> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U23.html" title="type typenum::generated::consts::U23">U23</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_ref-23" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.as_ref-23" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsRef.html#tymethod.as_ref" class="fn">as_ref</a>(&self) -> &<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 23]</a></h4></section></summary><div class='docblock'>Converts this type into a shared reference of the (usually inferred) input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-AsRef%3C%5BT%3B%2024%5D%3E-for-GenericArray%3CT%2C%20U24%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-AsRef%3C%5BT%3B%2024%5D%3E-for-GenericArray%3CT%2C%20U24%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 24]</a>> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U24.html" title="type typenum::generated::consts::U24">U24</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_ref-24" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.as_ref-24" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsRef.html#tymethod.as_ref" class="fn">as_ref</a>(&self) -> &<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 24]</a></h4></section></summary><div class='docblock'>Converts this type into a shared reference of the (usually inferred) input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-AsRef%3C%5BT%3B%2025%5D%3E-for-GenericArray%3CT%2C%20U25%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-AsRef%3C%5BT%3B%2025%5D%3E-for-GenericArray%3CT%2C%20U25%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 25]</a>> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U25.html" title="type typenum::generated::consts::U25">U25</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_ref-25" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.as_ref-25" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsRef.html#tymethod.as_ref" class="fn">as_ref</a>(&self) -> &<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 25]</a></h4></section></summary><div class='docblock'>Converts this type into a shared reference of the (usually inferred) input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-AsRef%3C%5BT%3B%2026%5D%3E-for-GenericArray%3CT%2C%20U26%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-AsRef%3C%5BT%3B%2026%5D%3E-for-GenericArray%3CT%2C%20U26%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 26]</a>> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U26.html" title="type typenum::generated::consts::U26">U26</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_ref-26" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.as_ref-26" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsRef.html#tymethod.as_ref" class="fn">as_ref</a>(&self) -> &<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 26]</a></h4></section></summary><div class='docblock'>Converts this type into a shared reference of the (usually inferred) input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-AsRef%3C%5BT%3B%2027%5D%3E-for-GenericArray%3CT%2C%20U27%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-AsRef%3C%5BT%3B%2027%5D%3E-for-GenericArray%3CT%2C%20U27%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 27]</a>> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U27.html" title="type typenum::generated::consts::U27">U27</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_ref-27" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.as_ref-27" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsRef.html#tymethod.as_ref" class="fn">as_ref</a>(&self) -> &<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 27]</a></h4></section></summary><div class='docblock'>Converts this type into a shared reference of the (usually inferred) input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-AsRef%3C%5BT%3B%2028%5D%3E-for-GenericArray%3CT%2C%20U28%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-AsRef%3C%5BT%3B%2028%5D%3E-for-GenericArray%3CT%2C%20U28%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 28]</a>> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U28.html" title="type typenum::generated::consts::U28">U28</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_ref-28" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.as_ref-28" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsRef.html#tymethod.as_ref" class="fn">as_ref</a>(&self) -> &<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 28]</a></h4></section></summary><div class='docblock'>Converts this type into a shared reference of the (usually inferred) input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-AsRef%3C%5BT%3B%2029%5D%3E-for-GenericArray%3CT%2C%20U29%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-AsRef%3C%5BT%3B%2029%5D%3E-for-GenericArray%3CT%2C%20U29%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 29]</a>> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U29.html" title="type typenum::generated::consts::U29">U29</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_ref-29" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.as_ref-29" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsRef.html#tymethod.as_ref" class="fn">as_ref</a>(&self) -> &<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 29]</a></h4></section></summary><div class='docblock'>Converts this type into a shared reference of the (usually inferred) input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-AsRef%3C%5BT%3B%203%5D%3E-for-GenericArray%3CT%2C%20U3%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-AsRef%3C%5BT%3B%203%5D%3E-for-GenericArray%3CT%2C%20U3%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 3]</a>> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U3.html" title="type typenum::generated::consts::U3">U3</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_ref-3" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.as_ref-3" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsRef.html#tymethod.as_ref" class="fn">as_ref</a>(&self) -> &<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 3]</a></h4></section></summary><div class='docblock'>Converts this type into a shared reference of the (usually inferred) input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-AsRef%3C%5BT%3B%2030%5D%3E-for-GenericArray%3CT%2C%20U30%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-AsRef%3C%5BT%3B%2030%5D%3E-for-GenericArray%3CT%2C%20U30%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 30]</a>> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U30.html" title="type typenum::generated::consts::U30">U30</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_ref-30" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.as_ref-30" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsRef.html#tymethod.as_ref" class="fn">as_ref</a>(&self) -> &<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 30]</a></h4></section></summary><div class='docblock'>Converts this type into a shared reference of the (usually inferred) input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-AsRef%3C%5BT%3B%2031%5D%3E-for-GenericArray%3CT%2C%20U31%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-AsRef%3C%5BT%3B%2031%5D%3E-for-GenericArray%3CT%2C%20U31%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 31]</a>> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U31.html" title="type typenum::generated::consts::U31">U31</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_ref-31" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.as_ref-31" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsRef.html#tymethod.as_ref" class="fn">as_ref</a>(&self) -> &<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 31]</a></h4></section></summary><div class='docblock'>Converts this type into a shared reference of the (usually inferred) input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-AsRef%3C%5BT%3B%2032%5D%3E-for-GenericArray%3CT%2C%20U32%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-AsRef%3C%5BT%3B%2032%5D%3E-for-GenericArray%3CT%2C%20U32%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 32]</a>> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U32.html" title="type typenum::generated::consts::U32">U32</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_ref-32" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.as_ref-32" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsRef.html#tymethod.as_ref" class="fn">as_ref</a>(&self) -> &<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 32]</a></h4></section></summary><div class='docblock'>Converts this type into a shared reference of the (usually inferred) input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-AsRef%3C%5BT%3B%204%5D%3E-for-GenericArray%3CT%2C%20U4%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-AsRef%3C%5BT%3B%204%5D%3E-for-GenericArray%3CT%2C%20U4%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 4]</a>> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U4.html" title="type typenum::generated::consts::U4">U4</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_ref-4" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.as_ref-4" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsRef.html#tymethod.as_ref" class="fn">as_ref</a>(&self) -> &<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 4]</a></h4></section></summary><div class='docblock'>Converts this type into a shared reference of the (usually inferred) input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-AsRef%3C%5BT%3B%205%5D%3E-for-GenericArray%3CT%2C%20U5%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-AsRef%3C%5BT%3B%205%5D%3E-for-GenericArray%3CT%2C%20U5%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 5]</a>> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U5.html" title="type typenum::generated::consts::U5">U5</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_ref-5" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.as_ref-5" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsRef.html#tymethod.as_ref" class="fn">as_ref</a>(&self) -> &<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 5]</a></h4></section></summary><div class='docblock'>Converts this type into a shared reference of the (usually inferred) input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-AsRef%3C%5BT%3B%206%5D%3E-for-GenericArray%3CT%2C%20U6%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-AsRef%3C%5BT%3B%206%5D%3E-for-GenericArray%3CT%2C%20U6%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 6]</a>> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U6.html" title="type typenum::generated::consts::U6">U6</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_ref-6" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.as_ref-6" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsRef.html#tymethod.as_ref" class="fn">as_ref</a>(&self) -> &<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 6]</a></h4></section></summary><div class='docblock'>Converts this type into a shared reference of the (usually inferred) input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-AsRef%3C%5BT%3B%207%5D%3E-for-GenericArray%3CT%2C%20U7%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-AsRef%3C%5BT%3B%207%5D%3E-for-GenericArray%3CT%2C%20U7%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 7]</a>> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U7.html" title="type typenum::generated::consts::U7">U7</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_ref-7" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.as_ref-7" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsRef.html#tymethod.as_ref" class="fn">as_ref</a>(&self) -> &<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 7]</a></h4></section></summary><div class='docblock'>Converts this type into a shared reference of the (usually inferred) input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-AsRef%3C%5BT%3B%208%5D%3E-for-GenericArray%3CT%2C%20U8%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-AsRef%3C%5BT%3B%208%5D%3E-for-GenericArray%3CT%2C%20U8%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 8]</a>> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U8.html" title="type typenum::generated::consts::U8">U8</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_ref-8" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.as_ref-8" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsRef.html#tymethod.as_ref" class="fn">as_ref</a>(&self) -> &<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 8]</a></h4></section></summary><div class='docblock'>Converts this type into a shared reference of the (usually inferred) input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-AsRef%3C%5BT%3B%209%5D%3E-for-GenericArray%3CT%2C%20U9%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-AsRef%3C%5BT%3B%209%5D%3E-for-GenericArray%3CT%2C%20U9%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 9]</a>> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U9.html" title="type typenum::generated::consts::U9">U9</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_ref-9" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.as_ref-9" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsRef.html#tymethod.as_ref" class="fn">as_ref</a>(&self) -> &<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 9]</a></h4></section></summary><div class='docblock'>Converts this type into a shared reference of the (usually inferred) input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-AsRef%3C%5BT%5D%3E-for-GenericArray%3CT%2C%20N%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#94-102">source</a><a href="#impl-AsRef%3C%5BT%5D%3E-for-GenericArray%3CT%2C%20N%3E" class="anchor">§</a><h3 class="code-header">impl<T, N> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html">[T]</a>> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, N><span class="where fmt-newline">where<br> N: <a class="trait" href="trait.ArrayLength.html" title="trait generic_array::ArrayLength">ArrayLength</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_ref" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#99-101">source</a><a href="#method.as_ref" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.AsRef.html#tymethod.as_ref" class="fn">as_ref</a>(&self) -> &<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html">[T]</a></h4></section></summary><div class='docblock'>Converts this type into a shared reference of the (usually inferred) input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Borrow%3C%5BT%5D%3E-for-GenericArray%3CT%2C%20N%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#74-82">source</a><a href="#impl-Borrow%3C%5BT%5D%3E-for-GenericArray%3CT%2C%20N%3E" class="anchor">§</a><h3 class="code-header">impl<T, N> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html">[T]</a>> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, N><span class="where fmt-newline">where<br> N: <a class="trait" href="trait.ArrayLength.html" title="trait generic_array::ArrayLength">ArrayLength</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#79-81">source</a><a href="#method.borrow" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&self) -> &<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html">[T]</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.67.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-BorrowMut%3C%5BT%5D%3E-for-GenericArray%3CT%2C%20N%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#84-92">source</a><a href="#impl-BorrowMut%3C%5BT%5D%3E-for-GenericArray%3CT%2C%20N%3E" class="anchor">§</a><h3 class="code-header">impl<T, N> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html">[T]</a>> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, N><span class="where fmt-newline">where<br> N: <a class="trait" href="trait.ArrayLength.html" title="trait generic_array::ArrayLength">ArrayLength</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#89-91">source</a><a href="#method.borrow_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fn">borrow_mut</a>(&mut self) -> &mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html">[T]</a></h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.67.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Clone-for-GenericArray%3CT%2C%20N%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#21-28">source</a><a href="#impl-Clone-for-GenericArray%3CT%2C%20N%3E" class="anchor">§</a><h3 class="code-header">impl<T: <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>, N> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, N><span class="where fmt-newline">where<br> N: <a class="trait" href="trait.ArrayLength.html" title="trait generic_array::ArrayLength">ArrayLength</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.clone" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#25-27">source</a><a href="#method.clone" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/clone/trait.Clone.html#tymethod.clone" class="fn">clone</a>(&self) -> <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, N></h4></section></summary><div class='docblock'>Returns a copy of the value. <a href="https://doc.rust-lang.org/1.67.0/core/clone/trait.Clone.html#tymethod.clone">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.clone_from" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.67.0/src/core/clone.rs.html#132-134">source</a></span><a href="#method.clone_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/clone/trait.Clone.html#method.clone_from" class="fn">clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.reference.html">&</a>Self)</h4></section></summary><div class='docblock'>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/1.67.0/core/clone/trait.Clone.html#method.clone_from">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Concat%3CT%2C%20M%3E-for-GenericArray%3CT%2C%20N%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/sequence.rs.html#357-380">source</a><a href="#impl-Concat%3CT%2C%20M%3E-for-GenericArray%3CT%2C%20N%3E" class="anchor">§</a><h3 class="code-header">impl<T, N, M> <a class="trait" href="sequence/trait.Concat.html" title="trait generic_array::sequence::Concat">Concat</a><T, M> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, N><span class="where fmt-newline">where<br> N: <a class="trait" href="trait.ArrayLength.html" title="trait generic_array::ArrayLength">ArrayLength</a><T> + <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/ops/arith/trait.Add.html" title="trait core::ops::arith::Add">Add</a><M>,<br> M: <a class="trait" href="trait.ArrayLength.html" title="trait generic_array::ArrayLength">ArrayLength</a><T>,<br> <a class="type" href="../typenum/operator_aliases/type.Sum.html" title="type typenum::operator_aliases::Sum">Sum</a><N, M>: <a class="trait" href="trait.ArrayLength.html" title="trait generic_array::ArrayLength">ArrayLength</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Rest" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Rest" class="anchor">§</a><h4 class="code-header">type <a href="sequence/trait.Concat.html#associatedtype.Rest" class="associatedtype">Rest</a> = <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, M></h4></section></summary><div class='docblock'>Sequence to be concatenated with <code>self</code></div></details><details class="rustdoc-toggle" open><summary><section id="associatedtype.Output" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Output" class="anchor">§</a><h4 class="code-header">type <a href="sequence/trait.Concat.html#associatedtype.Output" class="associatedtype">Output</a> = <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <N as <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/ops/arith/trait.Add.html" title="trait core::ops::arith::Add">Add</a><M>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.67.0/core/ops/arith/trait.Add.html#associatedtype.Output" title="type core::ops::arith::Add::Output">Output</a>></h4></section></summary><div class='docblock'>Resulting sequence formed by the concatenation.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.concat" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/sequence.rs.html#366-379">source</a><a href="#method.concat" class="anchor">§</a><h4 class="code-header">fn <a href="sequence/trait.Concat.html#tymethod.concat" class="fn">concat</a>(self, rest: Self::<a class="associatedtype" href="sequence/trait.Concat.html#associatedtype.Rest" title="type generic_array::sequence::Concat::Rest">Rest</a>) -> Self::<a class="associatedtype" href="sequence/trait.Concat.html#associatedtype.Output" title="type generic_array::sequence::Concat::Output">Output</a></h4></section></summary><div class='docblock'>Concatenate, or join, two sequences.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Debug-for-GenericArray%3CT%2C%20N%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#65-72">source</a><a href="#impl-Debug-for-GenericArray%3CT%2C%20N%3E" class="anchor">§</a><h3 class="code-header">impl<T: <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a>, N> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, N><span class="where fmt-newline">where<br> N: <a class="trait" href="trait.ArrayLength.html" title="trait generic_array::ArrayLength">ArrayLength</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.fmt-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#69-71">source</a><a href="#method.fmt-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/fmt/trait.Debug.html#tymethod.fmt" class="fn">fmt</a>(&self, fmt: &mut <a class="struct" href="https://doc.rust-lang.org/1.67.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.67.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.67.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Default-for-GenericArray%3CT%2C%20N%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#11-19">source</a><a href="#impl-Default-for-GenericArray%3CT%2C%20N%3E" class="anchor">§</a><h3 class="code-header">impl<T: <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/default/trait.Default.html" title="trait core::default::Default">Default</a>, N> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/default/trait.Default.html" title="trait core::default::Default">Default</a> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, N><span class="where fmt-newline">where<br> N: <a class="trait" href="trait.ArrayLength.html" title="trait generic_array::ArrayLength">ArrayLength</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.default" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#16-18">source</a><a href="#method.default" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/default/trait.Default.html#tymethod.default" class="fn">default</a>() -> Self</h4></section></summary><div class='docblock'>Returns the “default value” for a type. <a href="https://doc.rust-lang.org/1.67.0/core/default/trait.Default.html#tymethod.default">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Deref-for-GenericArray%3CT%2C%20N%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/lib.rs.html#185-195">source</a><a href="#impl-Deref-for-GenericArray%3CT%2C%20N%3E" class="anchor">§</a><h3 class="code-header">impl<T, N> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/ops/deref/trait.Deref.html" title="trait core::ops::deref::Deref">Deref</a> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, N><span class="where fmt-newline">where<br> N: <a class="trait" href="trait.ArrayLength.html" title="trait generic_array::ArrayLength">ArrayLength</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Target" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Target" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.67.0/core/ops/deref/trait.Deref.html#associatedtype.Target" class="associatedtype">Target</a> = <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html">[T]</a></h4></section></summary><div class='docblock'>The resulting type after dereferencing.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.deref" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/lib.rs.html#192-194">source</a><a href="#method.deref" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/ops/deref/trait.Deref.html#tymethod.deref" class="fn">deref</a>(&self) -> &<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html">[T]</a></h4></section></summary><div class='docblock'>Dereferences the value.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-DerefMut-for-GenericArray%3CT%2C%20N%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/lib.rs.html#197-205">source</a><a href="#impl-DerefMut-for-GenericArray%3CT%2C%20N%3E" class="anchor">§</a><h3 class="code-header">impl<T, N> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/ops/deref/trait.DerefMut.html" title="trait core::ops::deref::DerefMut">DerefMut</a> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, N><span class="where fmt-newline">where<br> N: <a class="trait" href="trait.ArrayLength.html" title="trait generic_array::ArrayLength">ArrayLength</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.deref_mut" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/lib.rs.html#202-204">source</a><a href="#method.deref_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/ops/deref/trait.DerefMut.html#tymethod.deref_mut" class="fn">deref_mut</a>(&mut self) -> &mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html">[T]</a></h4></section></summary><div class='docblock'>Mutably dereferences the value.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%26%27a%20%5BT%3B%201%5D%3E-for-%26%27a%20GenericArray%3CT%2C%20U1%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3C%26%27a%20%5BT%3B%201%5D%3E-for-%26%27a%20GenericArray%3CT%2C%20U1%3E" class="anchor">§</a><h3 class="code-header">impl<'a, T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'a <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 1]</a>> for &'a <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U1.html" title="type typenum::generated::consts::U1">U1</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(slice: &<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 1]</a>) -> &<a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U1.html" title="type typenum::generated::consts::U1">U1</a>></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%26%27a%20%5BT%3B%2010%5D%3E-for-%26%27a%20GenericArray%3CT%2C%20U10%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3C%26%27a%20%5BT%3B%2010%5D%3E-for-%26%27a%20GenericArray%3CT%2C%20U10%3E" class="anchor">§</a><h3 class="code-header">impl<'a, T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'a <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 10]</a>> for &'a <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U10.html" title="type typenum::generated::consts::U10">U10</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-38" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-38" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(slice: &<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 10]</a>) -> &<a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U10.html" title="type typenum::generated::consts::U10">U10</a>></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%26%27a%20%5BT%3B%2011%5D%3E-for-%26%27a%20GenericArray%3CT%2C%20U11%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3C%26%27a%20%5BT%3B%2011%5D%3E-for-%26%27a%20GenericArray%3CT%2C%20U11%3E" class="anchor">§</a><h3 class="code-header">impl<'a, T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'a <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 11]</a>> for &'a <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U11.html" title="type typenum::generated::consts::U11">U11</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-42" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-42" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(slice: &<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 11]</a>) -> &<a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U11.html" title="type typenum::generated::consts::U11">U11</a>></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%26%27a%20%5BT%3B%2012%5D%3E-for-%26%27a%20GenericArray%3CT%2C%20U12%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3C%26%27a%20%5BT%3B%2012%5D%3E-for-%26%27a%20GenericArray%3CT%2C%20U12%3E" class="anchor">§</a><h3 class="code-header">impl<'a, T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'a <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 12]</a>> for &'a <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U12.html" title="type typenum::generated::consts::U12">U12</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-46" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-46" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(slice: &<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 12]</a>) -> &<a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U12.html" title="type typenum::generated::consts::U12">U12</a>></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%26%27a%20%5BT%3B%2013%5D%3E-for-%26%27a%20GenericArray%3CT%2C%20U13%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3C%26%27a%20%5BT%3B%2013%5D%3E-for-%26%27a%20GenericArray%3CT%2C%20U13%3E" class="anchor">§</a><h3 class="code-header">impl<'a, T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'a <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 13]</a>> for &'a <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U13.html" title="type typenum::generated::consts::U13">U13</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-50" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-50" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(slice: &<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 13]</a>) -> &<a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U13.html" title="type typenum::generated::consts::U13">U13</a>></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%26%27a%20%5BT%3B%2014%5D%3E-for-%26%27a%20GenericArray%3CT%2C%20U14%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3C%26%27a%20%5BT%3B%2014%5D%3E-for-%26%27a%20GenericArray%3CT%2C%20U14%3E" class="anchor">§</a><h3 class="code-header">impl<'a, T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'a <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 14]</a>> for &'a <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U14.html" title="type typenum::generated::consts::U14">U14</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-54" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-54" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(slice: &<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 14]</a>) -> &<a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U14.html" title="type typenum::generated::consts::U14">U14</a>></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%26%27a%20%5BT%3B%2015%5D%3E-for-%26%27a%20GenericArray%3CT%2C%20U15%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3C%26%27a%20%5BT%3B%2015%5D%3E-for-%26%27a%20GenericArray%3CT%2C%20U15%3E" class="anchor">§</a><h3 class="code-header">impl<'a, T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'a <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 15]</a>> for &'a <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U15.html" title="type typenum::generated::consts::U15">U15</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-58" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-58" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(slice: &<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 15]</a>) -> &<a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U15.html" title="type typenum::generated::consts::U15">U15</a>></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%26%27a%20%5BT%3B%2016%5D%3E-for-%26%27a%20GenericArray%3CT%2C%20U16%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3C%26%27a%20%5BT%3B%2016%5D%3E-for-%26%27a%20GenericArray%3CT%2C%20U16%3E" class="anchor">§</a><h3 class="code-header">impl<'a, T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'a <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 16]</a>> for &'a <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U16.html" title="type typenum::generated::consts::U16">U16</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-62" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-62" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(slice: &<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 16]</a>) -> &<a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U16.html" title="type typenum::generated::consts::U16">U16</a>></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%26%27a%20%5BT%3B%2017%5D%3E-for-%26%27a%20GenericArray%3CT%2C%20U17%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3C%26%27a%20%5BT%3B%2017%5D%3E-for-%26%27a%20GenericArray%3CT%2C%20U17%3E" class="anchor">§</a><h3 class="code-header">impl<'a, T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'a <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 17]</a>> for &'a <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U17.html" title="type typenum::generated::consts::U17">U17</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-66" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-66" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(slice: &<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 17]</a>) -> &<a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U17.html" title="type typenum::generated::consts::U17">U17</a>></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%26%27a%20%5BT%3B%2018%5D%3E-for-%26%27a%20GenericArray%3CT%2C%20U18%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3C%26%27a%20%5BT%3B%2018%5D%3E-for-%26%27a%20GenericArray%3CT%2C%20U18%3E" class="anchor">§</a><h3 class="code-header">impl<'a, T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'a <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 18]</a>> for &'a <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U18.html" title="type typenum::generated::consts::U18">U18</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-70" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-70" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(slice: &<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 18]</a>) -> &<a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U18.html" title="type typenum::generated::consts::U18">U18</a>></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%26%27a%20%5BT%3B%2019%5D%3E-for-%26%27a%20GenericArray%3CT%2C%20U19%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3C%26%27a%20%5BT%3B%2019%5D%3E-for-%26%27a%20GenericArray%3CT%2C%20U19%3E" class="anchor">§</a><h3 class="code-header">impl<'a, T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'a <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 19]</a>> for &'a <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U19.html" title="type typenum::generated::consts::U19">U19</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-74" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-74" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(slice: &<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 19]</a>) -> &<a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U19.html" title="type typenum::generated::consts::U19">U19</a>></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%26%27a%20%5BT%3B%202%5D%3E-for-%26%27a%20GenericArray%3CT%2C%20U2%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3C%26%27a%20%5BT%3B%202%5D%3E-for-%26%27a%20GenericArray%3CT%2C%20U2%3E" class="anchor">§</a><h3 class="code-header">impl<'a, T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'a <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 2]</a>> for &'a <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U2.html" title="type typenum::generated::consts::U2">U2</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-6" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-6" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(slice: &<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 2]</a>) -> &<a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U2.html" title="type typenum::generated::consts::U2">U2</a>></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%26%27a%20%5BT%3B%2020%5D%3E-for-%26%27a%20GenericArray%3CT%2C%20U20%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3C%26%27a%20%5BT%3B%2020%5D%3E-for-%26%27a%20GenericArray%3CT%2C%20U20%3E" class="anchor">§</a><h3 class="code-header">impl<'a, T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'a <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 20]</a>> for &'a <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U20.html" title="type typenum::generated::consts::U20">U20</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-78" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-78" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(slice: &<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 20]</a>) -> &<a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U20.html" title="type typenum::generated::consts::U20">U20</a>></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%26%27a%20%5BT%3B%2021%5D%3E-for-%26%27a%20GenericArray%3CT%2C%20U21%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3C%26%27a%20%5BT%3B%2021%5D%3E-for-%26%27a%20GenericArray%3CT%2C%20U21%3E" class="anchor">§</a><h3 class="code-header">impl<'a, T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'a <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 21]</a>> for &'a <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U21.html" title="type typenum::generated::consts::U21">U21</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-82" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-82" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(slice: &<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 21]</a>) -> &<a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U21.html" title="type typenum::generated::consts::U21">U21</a>></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%26%27a%20%5BT%3B%2022%5D%3E-for-%26%27a%20GenericArray%3CT%2C%20U22%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3C%26%27a%20%5BT%3B%2022%5D%3E-for-%26%27a%20GenericArray%3CT%2C%20U22%3E" class="anchor">§</a><h3 class="code-header">impl<'a, T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'a <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 22]</a>> for &'a <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U22.html" title="type typenum::generated::consts::U22">U22</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-86" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-86" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(slice: &<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 22]</a>) -> &<a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U22.html" title="type typenum::generated::consts::U22">U22</a>></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%26%27a%20%5BT%3B%2023%5D%3E-for-%26%27a%20GenericArray%3CT%2C%20U23%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3C%26%27a%20%5BT%3B%2023%5D%3E-for-%26%27a%20GenericArray%3CT%2C%20U23%3E" class="anchor">§</a><h3 class="code-header">impl<'a, T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'a <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 23]</a>> for &'a <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U23.html" title="type typenum::generated::consts::U23">U23</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-90" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-90" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(slice: &<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 23]</a>) -> &<a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U23.html" title="type typenum::generated::consts::U23">U23</a>></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%26%27a%20%5BT%3B%2024%5D%3E-for-%26%27a%20GenericArray%3CT%2C%20U24%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3C%26%27a%20%5BT%3B%2024%5D%3E-for-%26%27a%20GenericArray%3CT%2C%20U24%3E" class="anchor">§</a><h3 class="code-header">impl<'a, T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'a <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 24]</a>> for &'a <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U24.html" title="type typenum::generated::consts::U24">U24</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-94" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-94" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(slice: &<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 24]</a>) -> &<a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U24.html" title="type typenum::generated::consts::U24">U24</a>></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%26%27a%20%5BT%3B%2025%5D%3E-for-%26%27a%20GenericArray%3CT%2C%20U25%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3C%26%27a%20%5BT%3B%2025%5D%3E-for-%26%27a%20GenericArray%3CT%2C%20U25%3E" class="anchor">§</a><h3 class="code-header">impl<'a, T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'a <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 25]</a>> for &'a <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U25.html" title="type typenum::generated::consts::U25">U25</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-98" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-98" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(slice: &<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 25]</a>) -> &<a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U25.html" title="type typenum::generated::consts::U25">U25</a>></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%26%27a%20%5BT%3B%2026%5D%3E-for-%26%27a%20GenericArray%3CT%2C%20U26%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3C%26%27a%20%5BT%3B%2026%5D%3E-for-%26%27a%20GenericArray%3CT%2C%20U26%3E" class="anchor">§</a><h3 class="code-header">impl<'a, T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'a <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 26]</a>> for &'a <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U26.html" title="type typenum::generated::consts::U26">U26</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-102" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-102" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(slice: &<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 26]</a>) -> &<a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U26.html" title="type typenum::generated::consts::U26">U26</a>></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%26%27a%20%5BT%3B%2027%5D%3E-for-%26%27a%20GenericArray%3CT%2C%20U27%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3C%26%27a%20%5BT%3B%2027%5D%3E-for-%26%27a%20GenericArray%3CT%2C%20U27%3E" class="anchor">§</a><h3 class="code-header">impl<'a, T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'a <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 27]</a>> for &'a <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U27.html" title="type typenum::generated::consts::U27">U27</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-106" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-106" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(slice: &<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 27]</a>) -> &<a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U27.html" title="type typenum::generated::consts::U27">U27</a>></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%26%27a%20%5BT%3B%2028%5D%3E-for-%26%27a%20GenericArray%3CT%2C%20U28%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3C%26%27a%20%5BT%3B%2028%5D%3E-for-%26%27a%20GenericArray%3CT%2C%20U28%3E" class="anchor">§</a><h3 class="code-header">impl<'a, T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'a <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 28]</a>> for &'a <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U28.html" title="type typenum::generated::consts::U28">U28</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-110" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-110" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(slice: &<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 28]</a>) -> &<a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U28.html" title="type typenum::generated::consts::U28">U28</a>></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%26%27a%20%5BT%3B%2029%5D%3E-for-%26%27a%20GenericArray%3CT%2C%20U29%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3C%26%27a%20%5BT%3B%2029%5D%3E-for-%26%27a%20GenericArray%3CT%2C%20U29%3E" class="anchor">§</a><h3 class="code-header">impl<'a, T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'a <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 29]</a>> for &'a <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U29.html" title="type typenum::generated::consts::U29">U29</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-114" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-114" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(slice: &<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 29]</a>) -> &<a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U29.html" title="type typenum::generated::consts::U29">U29</a>></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%26%27a%20%5BT%3B%203%5D%3E-for-%26%27a%20GenericArray%3CT%2C%20U3%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3C%26%27a%20%5BT%3B%203%5D%3E-for-%26%27a%20GenericArray%3CT%2C%20U3%3E" class="anchor">§</a><h3 class="code-header">impl<'a, T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'a <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 3]</a>> for &'a <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U3.html" title="type typenum::generated::consts::U3">U3</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-10" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-10" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(slice: &<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 3]</a>) -> &<a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U3.html" title="type typenum::generated::consts::U3">U3</a>></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%26%27a%20%5BT%3B%2030%5D%3E-for-%26%27a%20GenericArray%3CT%2C%20U30%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3C%26%27a%20%5BT%3B%2030%5D%3E-for-%26%27a%20GenericArray%3CT%2C%20U30%3E" class="anchor">§</a><h3 class="code-header">impl<'a, T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'a <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 30]</a>> for &'a <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U30.html" title="type typenum::generated::consts::U30">U30</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-118" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-118" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(slice: &<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 30]</a>) -> &<a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U30.html" title="type typenum::generated::consts::U30">U30</a>></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%26%27a%20%5BT%3B%2031%5D%3E-for-%26%27a%20GenericArray%3CT%2C%20U31%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3C%26%27a%20%5BT%3B%2031%5D%3E-for-%26%27a%20GenericArray%3CT%2C%20U31%3E" class="anchor">§</a><h3 class="code-header">impl<'a, T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'a <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 31]</a>> for &'a <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U31.html" title="type typenum::generated::consts::U31">U31</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-122" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-122" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(slice: &<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 31]</a>) -> &<a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U31.html" title="type typenum::generated::consts::U31">U31</a>></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%26%27a%20%5BT%3B%2032%5D%3E-for-%26%27a%20GenericArray%3CT%2C%20U32%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3C%26%27a%20%5BT%3B%2032%5D%3E-for-%26%27a%20GenericArray%3CT%2C%20U32%3E" class="anchor">§</a><h3 class="code-header">impl<'a, T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'a <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 32]</a>> for &'a <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U32.html" title="type typenum::generated::consts::U32">U32</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-126" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-126" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(slice: &<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 32]</a>) -> &<a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U32.html" title="type typenum::generated::consts::U32">U32</a>></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%26%27a%20%5BT%3B%204%5D%3E-for-%26%27a%20GenericArray%3CT%2C%20U4%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3C%26%27a%20%5BT%3B%204%5D%3E-for-%26%27a%20GenericArray%3CT%2C%20U4%3E" class="anchor">§</a><h3 class="code-header">impl<'a, T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'a <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 4]</a>> for &'a <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U4.html" title="type typenum::generated::consts::U4">U4</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-14" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-14" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(slice: &<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 4]</a>) -> &<a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U4.html" title="type typenum::generated::consts::U4">U4</a>></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%26%27a%20%5BT%3B%205%5D%3E-for-%26%27a%20GenericArray%3CT%2C%20U5%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3C%26%27a%20%5BT%3B%205%5D%3E-for-%26%27a%20GenericArray%3CT%2C%20U5%3E" class="anchor">§</a><h3 class="code-header">impl<'a, T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'a <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 5]</a>> for &'a <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U5.html" title="type typenum::generated::consts::U5">U5</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-18" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-18" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(slice: &<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 5]</a>) -> &<a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U5.html" title="type typenum::generated::consts::U5">U5</a>></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%26%27a%20%5BT%3B%206%5D%3E-for-%26%27a%20GenericArray%3CT%2C%20U6%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3C%26%27a%20%5BT%3B%206%5D%3E-for-%26%27a%20GenericArray%3CT%2C%20U6%3E" class="anchor">§</a><h3 class="code-header">impl<'a, T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'a <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 6]</a>> for &'a <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U6.html" title="type typenum::generated::consts::U6">U6</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-22" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-22" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(slice: &<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 6]</a>) -> &<a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U6.html" title="type typenum::generated::consts::U6">U6</a>></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%26%27a%20%5BT%3B%207%5D%3E-for-%26%27a%20GenericArray%3CT%2C%20U7%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3C%26%27a%20%5BT%3B%207%5D%3E-for-%26%27a%20GenericArray%3CT%2C%20U7%3E" class="anchor">§</a><h3 class="code-header">impl<'a, T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'a <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 7]</a>> for &'a <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U7.html" title="type typenum::generated::consts::U7">U7</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-26" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-26" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(slice: &<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 7]</a>) -> &<a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U7.html" title="type typenum::generated::consts::U7">U7</a>></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%26%27a%20%5BT%3B%208%5D%3E-for-%26%27a%20GenericArray%3CT%2C%20U8%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3C%26%27a%20%5BT%3B%208%5D%3E-for-%26%27a%20GenericArray%3CT%2C%20U8%3E" class="anchor">§</a><h3 class="code-header">impl<'a, T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'a <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 8]</a>> for &'a <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U8.html" title="type typenum::generated::consts::U8">U8</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-30" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-30" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(slice: &<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 8]</a>) -> &<a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U8.html" title="type typenum::generated::consts::U8">U8</a>></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%26%27a%20%5BT%3B%209%5D%3E-for-%26%27a%20GenericArray%3CT%2C%20U9%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3C%26%27a%20%5BT%3B%209%5D%3E-for-%26%27a%20GenericArray%3CT%2C%20U9%3E" class="anchor">§</a><h3 class="code-header">impl<'a, T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'a <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 9]</a>> for &'a <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U9.html" title="type typenum::generated::consts::U9">U9</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-34" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-34" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(slice: &<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 9]</a>) -> &<a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U9.html" title="type typenum::generated::consts::U9">U9</a>></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%26%27a%20%5BT%5D%3E-for-%26%27a%20GenericArray%3CT%2C%20N%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/lib.rs.html#559-569">source</a><a href="#impl-From%3C%26%27a%20%5BT%5D%3E-for-%26%27a%20GenericArray%3CT%2C%20N%3E" class="anchor">§</a><h3 class="code-header">impl<'a, T, N: <a class="trait" href="trait.ArrayLength.html" title="trait generic_array::ArrayLength">ArrayLength</a><T>> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'a <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html">[T]</a>> for &'a <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, N></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-128" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/lib.rs.html#564-568">source</a><a href="#method.from-128" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(slice: &<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html">[T]</a>) -> &<a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, N></h4></section></summary><div class="docblock"><p>Converts slice to a generic array reference with inferred length;</p>
|
||
<p>Length of the slice must be equal to the length of the array.</p>
|
||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%26%27a%20mut%20%5BT%3B%201%5D%3E-for-%26%27a%20mut%20GenericArray%3CT%2C%20U1%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3C%26%27a%20mut%20%5BT%3B%201%5D%3E-for-%26%27a%20mut%20GenericArray%3CT%2C%20U1%3E" class="anchor">§</a><h3 class="code-header">impl<'a, T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'a mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 1]</a>> for &'a mut <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U1.html" title="type typenum::generated::consts::U1">U1</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-3" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-3" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(slice: &mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 1]</a>) -> &mut <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U1.html" title="type typenum::generated::consts::U1">U1</a>></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%26%27a%20mut%20%5BT%3B%2010%5D%3E-for-%26%27a%20mut%20GenericArray%3CT%2C%20U10%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3C%26%27a%20mut%20%5BT%3B%2010%5D%3E-for-%26%27a%20mut%20GenericArray%3CT%2C%20U10%3E" class="anchor">§</a><h3 class="code-header">impl<'a, T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'a mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 10]</a>> for &'a mut <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U10.html" title="type typenum::generated::consts::U10">U10</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-39" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-39" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(slice: &mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 10]</a>) -> &mut <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U10.html" title="type typenum::generated::consts::U10">U10</a>></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%26%27a%20mut%20%5BT%3B%2011%5D%3E-for-%26%27a%20mut%20GenericArray%3CT%2C%20U11%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3C%26%27a%20mut%20%5BT%3B%2011%5D%3E-for-%26%27a%20mut%20GenericArray%3CT%2C%20U11%3E" class="anchor">§</a><h3 class="code-header">impl<'a, T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'a mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 11]</a>> for &'a mut <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U11.html" title="type typenum::generated::consts::U11">U11</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-43" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-43" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(slice: &mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 11]</a>) -> &mut <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U11.html" title="type typenum::generated::consts::U11">U11</a>></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%26%27a%20mut%20%5BT%3B%2012%5D%3E-for-%26%27a%20mut%20GenericArray%3CT%2C%20U12%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3C%26%27a%20mut%20%5BT%3B%2012%5D%3E-for-%26%27a%20mut%20GenericArray%3CT%2C%20U12%3E" class="anchor">§</a><h3 class="code-header">impl<'a, T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'a mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 12]</a>> for &'a mut <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U12.html" title="type typenum::generated::consts::U12">U12</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-47" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-47" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(slice: &mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 12]</a>) -> &mut <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U12.html" title="type typenum::generated::consts::U12">U12</a>></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%26%27a%20mut%20%5BT%3B%2013%5D%3E-for-%26%27a%20mut%20GenericArray%3CT%2C%20U13%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3C%26%27a%20mut%20%5BT%3B%2013%5D%3E-for-%26%27a%20mut%20GenericArray%3CT%2C%20U13%3E" class="anchor">§</a><h3 class="code-header">impl<'a, T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'a mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 13]</a>> for &'a mut <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U13.html" title="type typenum::generated::consts::U13">U13</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-51" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-51" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(slice: &mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 13]</a>) -> &mut <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U13.html" title="type typenum::generated::consts::U13">U13</a>></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%26%27a%20mut%20%5BT%3B%2014%5D%3E-for-%26%27a%20mut%20GenericArray%3CT%2C%20U14%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3C%26%27a%20mut%20%5BT%3B%2014%5D%3E-for-%26%27a%20mut%20GenericArray%3CT%2C%20U14%3E" class="anchor">§</a><h3 class="code-header">impl<'a, T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'a mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 14]</a>> for &'a mut <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U14.html" title="type typenum::generated::consts::U14">U14</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-55" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-55" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(slice: &mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 14]</a>) -> &mut <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U14.html" title="type typenum::generated::consts::U14">U14</a>></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%26%27a%20mut%20%5BT%3B%2015%5D%3E-for-%26%27a%20mut%20GenericArray%3CT%2C%20U15%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3C%26%27a%20mut%20%5BT%3B%2015%5D%3E-for-%26%27a%20mut%20GenericArray%3CT%2C%20U15%3E" class="anchor">§</a><h3 class="code-header">impl<'a, T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'a mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 15]</a>> for &'a mut <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U15.html" title="type typenum::generated::consts::U15">U15</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-59" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-59" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(slice: &mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 15]</a>) -> &mut <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U15.html" title="type typenum::generated::consts::U15">U15</a>></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%26%27a%20mut%20%5BT%3B%2016%5D%3E-for-%26%27a%20mut%20GenericArray%3CT%2C%20U16%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3C%26%27a%20mut%20%5BT%3B%2016%5D%3E-for-%26%27a%20mut%20GenericArray%3CT%2C%20U16%3E" class="anchor">§</a><h3 class="code-header">impl<'a, T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'a mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 16]</a>> for &'a mut <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U16.html" title="type typenum::generated::consts::U16">U16</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-63" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-63" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(slice: &mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 16]</a>) -> &mut <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U16.html" title="type typenum::generated::consts::U16">U16</a>></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%26%27a%20mut%20%5BT%3B%2017%5D%3E-for-%26%27a%20mut%20GenericArray%3CT%2C%20U17%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3C%26%27a%20mut%20%5BT%3B%2017%5D%3E-for-%26%27a%20mut%20GenericArray%3CT%2C%20U17%3E" class="anchor">§</a><h3 class="code-header">impl<'a, T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'a mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 17]</a>> for &'a mut <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U17.html" title="type typenum::generated::consts::U17">U17</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-67" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-67" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(slice: &mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 17]</a>) -> &mut <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U17.html" title="type typenum::generated::consts::U17">U17</a>></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%26%27a%20mut%20%5BT%3B%2018%5D%3E-for-%26%27a%20mut%20GenericArray%3CT%2C%20U18%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3C%26%27a%20mut%20%5BT%3B%2018%5D%3E-for-%26%27a%20mut%20GenericArray%3CT%2C%20U18%3E" class="anchor">§</a><h3 class="code-header">impl<'a, T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'a mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 18]</a>> for &'a mut <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U18.html" title="type typenum::generated::consts::U18">U18</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-71" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-71" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(slice: &mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 18]</a>) -> &mut <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U18.html" title="type typenum::generated::consts::U18">U18</a>></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%26%27a%20mut%20%5BT%3B%2019%5D%3E-for-%26%27a%20mut%20GenericArray%3CT%2C%20U19%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3C%26%27a%20mut%20%5BT%3B%2019%5D%3E-for-%26%27a%20mut%20GenericArray%3CT%2C%20U19%3E" class="anchor">§</a><h3 class="code-header">impl<'a, T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'a mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 19]</a>> for &'a mut <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U19.html" title="type typenum::generated::consts::U19">U19</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-75" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-75" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(slice: &mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 19]</a>) -> &mut <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U19.html" title="type typenum::generated::consts::U19">U19</a>></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%26%27a%20mut%20%5BT%3B%202%5D%3E-for-%26%27a%20mut%20GenericArray%3CT%2C%20U2%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3C%26%27a%20mut%20%5BT%3B%202%5D%3E-for-%26%27a%20mut%20GenericArray%3CT%2C%20U2%3E" class="anchor">§</a><h3 class="code-header">impl<'a, T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'a mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 2]</a>> for &'a mut <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U2.html" title="type typenum::generated::consts::U2">U2</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-7" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-7" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(slice: &mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 2]</a>) -> &mut <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U2.html" title="type typenum::generated::consts::U2">U2</a>></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%26%27a%20mut%20%5BT%3B%2020%5D%3E-for-%26%27a%20mut%20GenericArray%3CT%2C%20U20%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3C%26%27a%20mut%20%5BT%3B%2020%5D%3E-for-%26%27a%20mut%20GenericArray%3CT%2C%20U20%3E" class="anchor">§</a><h3 class="code-header">impl<'a, T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'a mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 20]</a>> for &'a mut <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U20.html" title="type typenum::generated::consts::U20">U20</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-79" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-79" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(slice: &mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 20]</a>) -> &mut <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U20.html" title="type typenum::generated::consts::U20">U20</a>></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%26%27a%20mut%20%5BT%3B%2021%5D%3E-for-%26%27a%20mut%20GenericArray%3CT%2C%20U21%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3C%26%27a%20mut%20%5BT%3B%2021%5D%3E-for-%26%27a%20mut%20GenericArray%3CT%2C%20U21%3E" class="anchor">§</a><h3 class="code-header">impl<'a, T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'a mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 21]</a>> for &'a mut <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U21.html" title="type typenum::generated::consts::U21">U21</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-83" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-83" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(slice: &mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 21]</a>) -> &mut <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U21.html" title="type typenum::generated::consts::U21">U21</a>></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%26%27a%20mut%20%5BT%3B%2022%5D%3E-for-%26%27a%20mut%20GenericArray%3CT%2C%20U22%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3C%26%27a%20mut%20%5BT%3B%2022%5D%3E-for-%26%27a%20mut%20GenericArray%3CT%2C%20U22%3E" class="anchor">§</a><h3 class="code-header">impl<'a, T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'a mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 22]</a>> for &'a mut <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U22.html" title="type typenum::generated::consts::U22">U22</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-87" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-87" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(slice: &mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 22]</a>) -> &mut <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U22.html" title="type typenum::generated::consts::U22">U22</a>></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%26%27a%20mut%20%5BT%3B%2023%5D%3E-for-%26%27a%20mut%20GenericArray%3CT%2C%20U23%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3C%26%27a%20mut%20%5BT%3B%2023%5D%3E-for-%26%27a%20mut%20GenericArray%3CT%2C%20U23%3E" class="anchor">§</a><h3 class="code-header">impl<'a, T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'a mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 23]</a>> for &'a mut <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U23.html" title="type typenum::generated::consts::U23">U23</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-91" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-91" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(slice: &mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 23]</a>) -> &mut <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U23.html" title="type typenum::generated::consts::U23">U23</a>></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%26%27a%20mut%20%5BT%3B%2024%5D%3E-for-%26%27a%20mut%20GenericArray%3CT%2C%20U24%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3C%26%27a%20mut%20%5BT%3B%2024%5D%3E-for-%26%27a%20mut%20GenericArray%3CT%2C%20U24%3E" class="anchor">§</a><h3 class="code-header">impl<'a, T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'a mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 24]</a>> for &'a mut <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U24.html" title="type typenum::generated::consts::U24">U24</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-95" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-95" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(slice: &mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 24]</a>) -> &mut <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U24.html" title="type typenum::generated::consts::U24">U24</a>></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%26%27a%20mut%20%5BT%3B%2025%5D%3E-for-%26%27a%20mut%20GenericArray%3CT%2C%20U25%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3C%26%27a%20mut%20%5BT%3B%2025%5D%3E-for-%26%27a%20mut%20GenericArray%3CT%2C%20U25%3E" class="anchor">§</a><h3 class="code-header">impl<'a, T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'a mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 25]</a>> for &'a mut <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U25.html" title="type typenum::generated::consts::U25">U25</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-99" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-99" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(slice: &mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 25]</a>) -> &mut <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U25.html" title="type typenum::generated::consts::U25">U25</a>></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%26%27a%20mut%20%5BT%3B%2026%5D%3E-for-%26%27a%20mut%20GenericArray%3CT%2C%20U26%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3C%26%27a%20mut%20%5BT%3B%2026%5D%3E-for-%26%27a%20mut%20GenericArray%3CT%2C%20U26%3E" class="anchor">§</a><h3 class="code-header">impl<'a, T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'a mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 26]</a>> for &'a mut <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U26.html" title="type typenum::generated::consts::U26">U26</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-103" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-103" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(slice: &mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 26]</a>) -> &mut <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U26.html" title="type typenum::generated::consts::U26">U26</a>></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%26%27a%20mut%20%5BT%3B%2027%5D%3E-for-%26%27a%20mut%20GenericArray%3CT%2C%20U27%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3C%26%27a%20mut%20%5BT%3B%2027%5D%3E-for-%26%27a%20mut%20GenericArray%3CT%2C%20U27%3E" class="anchor">§</a><h3 class="code-header">impl<'a, T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'a mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 27]</a>> for &'a mut <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U27.html" title="type typenum::generated::consts::U27">U27</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-107" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-107" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(slice: &mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 27]</a>) -> &mut <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U27.html" title="type typenum::generated::consts::U27">U27</a>></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%26%27a%20mut%20%5BT%3B%2028%5D%3E-for-%26%27a%20mut%20GenericArray%3CT%2C%20U28%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3C%26%27a%20mut%20%5BT%3B%2028%5D%3E-for-%26%27a%20mut%20GenericArray%3CT%2C%20U28%3E" class="anchor">§</a><h3 class="code-header">impl<'a, T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'a mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 28]</a>> for &'a mut <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U28.html" title="type typenum::generated::consts::U28">U28</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-111" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-111" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(slice: &mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 28]</a>) -> &mut <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U28.html" title="type typenum::generated::consts::U28">U28</a>></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%26%27a%20mut%20%5BT%3B%2029%5D%3E-for-%26%27a%20mut%20GenericArray%3CT%2C%20U29%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3C%26%27a%20mut%20%5BT%3B%2029%5D%3E-for-%26%27a%20mut%20GenericArray%3CT%2C%20U29%3E" class="anchor">§</a><h3 class="code-header">impl<'a, T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'a mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 29]</a>> for &'a mut <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U29.html" title="type typenum::generated::consts::U29">U29</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-115" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-115" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(slice: &mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 29]</a>) -> &mut <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U29.html" title="type typenum::generated::consts::U29">U29</a>></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%26%27a%20mut%20%5BT%3B%203%5D%3E-for-%26%27a%20mut%20GenericArray%3CT%2C%20U3%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3C%26%27a%20mut%20%5BT%3B%203%5D%3E-for-%26%27a%20mut%20GenericArray%3CT%2C%20U3%3E" class="anchor">§</a><h3 class="code-header">impl<'a, T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'a mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 3]</a>> for &'a mut <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U3.html" title="type typenum::generated::consts::U3">U3</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-11" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-11" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(slice: &mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 3]</a>) -> &mut <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U3.html" title="type typenum::generated::consts::U3">U3</a>></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%26%27a%20mut%20%5BT%3B%2030%5D%3E-for-%26%27a%20mut%20GenericArray%3CT%2C%20U30%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3C%26%27a%20mut%20%5BT%3B%2030%5D%3E-for-%26%27a%20mut%20GenericArray%3CT%2C%20U30%3E" class="anchor">§</a><h3 class="code-header">impl<'a, T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'a mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 30]</a>> for &'a mut <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U30.html" title="type typenum::generated::consts::U30">U30</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-119" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-119" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(slice: &mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 30]</a>) -> &mut <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U30.html" title="type typenum::generated::consts::U30">U30</a>></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%26%27a%20mut%20%5BT%3B%2031%5D%3E-for-%26%27a%20mut%20GenericArray%3CT%2C%20U31%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3C%26%27a%20mut%20%5BT%3B%2031%5D%3E-for-%26%27a%20mut%20GenericArray%3CT%2C%20U31%3E" class="anchor">§</a><h3 class="code-header">impl<'a, T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'a mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 31]</a>> for &'a mut <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U31.html" title="type typenum::generated::consts::U31">U31</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-123" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-123" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(slice: &mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 31]</a>) -> &mut <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U31.html" title="type typenum::generated::consts::U31">U31</a>></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%26%27a%20mut%20%5BT%3B%2032%5D%3E-for-%26%27a%20mut%20GenericArray%3CT%2C%20U32%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3C%26%27a%20mut%20%5BT%3B%2032%5D%3E-for-%26%27a%20mut%20GenericArray%3CT%2C%20U32%3E" class="anchor">§</a><h3 class="code-header">impl<'a, T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'a mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 32]</a>> for &'a mut <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U32.html" title="type typenum::generated::consts::U32">U32</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-127" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-127" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(slice: &mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 32]</a>) -> &mut <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U32.html" title="type typenum::generated::consts::U32">U32</a>></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%26%27a%20mut%20%5BT%3B%204%5D%3E-for-%26%27a%20mut%20GenericArray%3CT%2C%20U4%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3C%26%27a%20mut%20%5BT%3B%204%5D%3E-for-%26%27a%20mut%20GenericArray%3CT%2C%20U4%3E" class="anchor">§</a><h3 class="code-header">impl<'a, T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'a mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 4]</a>> for &'a mut <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U4.html" title="type typenum::generated::consts::U4">U4</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-15" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-15" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(slice: &mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 4]</a>) -> &mut <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U4.html" title="type typenum::generated::consts::U4">U4</a>></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%26%27a%20mut%20%5BT%3B%205%5D%3E-for-%26%27a%20mut%20GenericArray%3CT%2C%20U5%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3C%26%27a%20mut%20%5BT%3B%205%5D%3E-for-%26%27a%20mut%20GenericArray%3CT%2C%20U5%3E" class="anchor">§</a><h3 class="code-header">impl<'a, T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'a mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 5]</a>> for &'a mut <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U5.html" title="type typenum::generated::consts::U5">U5</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-19" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-19" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(slice: &mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 5]</a>) -> &mut <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U5.html" title="type typenum::generated::consts::U5">U5</a>></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%26%27a%20mut%20%5BT%3B%206%5D%3E-for-%26%27a%20mut%20GenericArray%3CT%2C%20U6%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3C%26%27a%20mut%20%5BT%3B%206%5D%3E-for-%26%27a%20mut%20GenericArray%3CT%2C%20U6%3E" class="anchor">§</a><h3 class="code-header">impl<'a, T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'a mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 6]</a>> for &'a mut <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U6.html" title="type typenum::generated::consts::U6">U6</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-23" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-23" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(slice: &mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 6]</a>) -> &mut <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U6.html" title="type typenum::generated::consts::U6">U6</a>></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%26%27a%20mut%20%5BT%3B%207%5D%3E-for-%26%27a%20mut%20GenericArray%3CT%2C%20U7%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3C%26%27a%20mut%20%5BT%3B%207%5D%3E-for-%26%27a%20mut%20GenericArray%3CT%2C%20U7%3E" class="anchor">§</a><h3 class="code-header">impl<'a, T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'a mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 7]</a>> for &'a mut <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U7.html" title="type typenum::generated::consts::U7">U7</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-27" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-27" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(slice: &mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 7]</a>) -> &mut <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U7.html" title="type typenum::generated::consts::U7">U7</a>></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%26%27a%20mut%20%5BT%3B%208%5D%3E-for-%26%27a%20mut%20GenericArray%3CT%2C%20U8%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3C%26%27a%20mut%20%5BT%3B%208%5D%3E-for-%26%27a%20mut%20GenericArray%3CT%2C%20U8%3E" class="anchor">§</a><h3 class="code-header">impl<'a, T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'a mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 8]</a>> for &'a mut <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U8.html" title="type typenum::generated::consts::U8">U8</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-31" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-31" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(slice: &mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 8]</a>) -> &mut <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U8.html" title="type typenum::generated::consts::U8">U8</a>></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%26%27a%20mut%20%5BT%3B%209%5D%3E-for-%26%27a%20mut%20GenericArray%3CT%2C%20U9%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3C%26%27a%20mut%20%5BT%3B%209%5D%3E-for-%26%27a%20mut%20GenericArray%3CT%2C%20U9%3E" class="anchor">§</a><h3 class="code-header">impl<'a, T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'a mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 9]</a>> for &'a mut <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U9.html" title="type typenum::generated::consts::U9">U9</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-35" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-35" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(slice: &mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 9]</a>) -> &mut <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U9.html" title="type typenum::generated::consts::U9">U9</a>></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%26%27a%20mut%20%5BT%5D%3E-for-%26%27a%20mut%20GenericArray%3CT%2C%20N%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/lib.rs.html#571-581">source</a><a href="#impl-From%3C%26%27a%20mut%20%5BT%5D%3E-for-%26%27a%20mut%20GenericArray%3CT%2C%20N%3E" class="anchor">§</a><h3 class="code-header">impl<'a, T, N: <a class="trait" href="trait.ArrayLength.html" title="trait generic_array::ArrayLength">ArrayLength</a><T>> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'a mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html">[T]</a>> for &'a mut <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, N></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-129" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/lib.rs.html#576-580">source</a><a href="#method.from-129" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(slice: &mut <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html">[T]</a>) -> &mut <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, N></h4></section></summary><div class="docblock"><p>Converts mutable slice to a mutable generic array reference</p>
|
||
<p>Length of the slice must be equal to the length of the array.</p>
|
||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%5BT%3B%201%5D%3E-for-GenericArray%3CT%2C%20U1%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3C%5BT%3B%201%5D%3E-for-GenericArray%3CT%2C%20U1%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 1]</a>> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U1.html" title="type typenum::generated::consts::U1">U1</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(arr: <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 1]</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%5BT%3B%2010%5D%3E-for-GenericArray%3CT%2C%20U10%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3C%5BT%3B%2010%5D%3E-for-GenericArray%3CT%2C%20U10%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 10]</a>> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U10.html" title="type typenum::generated::consts::U10">U10</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-36" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-36" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(arr: <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 10]</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%5BT%3B%2011%5D%3E-for-GenericArray%3CT%2C%20U11%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3C%5BT%3B%2011%5D%3E-for-GenericArray%3CT%2C%20U11%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 11]</a>> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U11.html" title="type typenum::generated::consts::U11">U11</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-40" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-40" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(arr: <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 11]</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%5BT%3B%2012%5D%3E-for-GenericArray%3CT%2C%20U12%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3C%5BT%3B%2012%5D%3E-for-GenericArray%3CT%2C%20U12%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 12]</a>> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U12.html" title="type typenum::generated::consts::U12">U12</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-44" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-44" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(arr: <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 12]</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%5BT%3B%2013%5D%3E-for-GenericArray%3CT%2C%20U13%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3C%5BT%3B%2013%5D%3E-for-GenericArray%3CT%2C%20U13%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 13]</a>> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U13.html" title="type typenum::generated::consts::U13">U13</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-48" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-48" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(arr: <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 13]</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%5BT%3B%2014%5D%3E-for-GenericArray%3CT%2C%20U14%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3C%5BT%3B%2014%5D%3E-for-GenericArray%3CT%2C%20U14%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 14]</a>> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U14.html" title="type typenum::generated::consts::U14">U14</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-52" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-52" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(arr: <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 14]</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%5BT%3B%2015%5D%3E-for-GenericArray%3CT%2C%20U15%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3C%5BT%3B%2015%5D%3E-for-GenericArray%3CT%2C%20U15%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 15]</a>> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U15.html" title="type typenum::generated::consts::U15">U15</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-56" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-56" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(arr: <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 15]</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%5BT%3B%2016%5D%3E-for-GenericArray%3CT%2C%20U16%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3C%5BT%3B%2016%5D%3E-for-GenericArray%3CT%2C%20U16%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 16]</a>> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U16.html" title="type typenum::generated::consts::U16">U16</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-60" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-60" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(arr: <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 16]</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%5BT%3B%2017%5D%3E-for-GenericArray%3CT%2C%20U17%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3C%5BT%3B%2017%5D%3E-for-GenericArray%3CT%2C%20U17%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 17]</a>> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U17.html" title="type typenum::generated::consts::U17">U17</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-64" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-64" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(arr: <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 17]</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%5BT%3B%2018%5D%3E-for-GenericArray%3CT%2C%20U18%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3C%5BT%3B%2018%5D%3E-for-GenericArray%3CT%2C%20U18%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 18]</a>> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U18.html" title="type typenum::generated::consts::U18">U18</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-68" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-68" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(arr: <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 18]</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%5BT%3B%2019%5D%3E-for-GenericArray%3CT%2C%20U19%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3C%5BT%3B%2019%5D%3E-for-GenericArray%3CT%2C%20U19%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 19]</a>> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U19.html" title="type typenum::generated::consts::U19">U19</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-72" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-72" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(arr: <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 19]</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%5BT%3B%202%5D%3E-for-GenericArray%3CT%2C%20U2%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3C%5BT%3B%202%5D%3E-for-GenericArray%3CT%2C%20U2%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 2]</a>> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U2.html" title="type typenum::generated::consts::U2">U2</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-4" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-4" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(arr: <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 2]</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%5BT%3B%2020%5D%3E-for-GenericArray%3CT%2C%20U20%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3C%5BT%3B%2020%5D%3E-for-GenericArray%3CT%2C%20U20%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 20]</a>> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U20.html" title="type typenum::generated::consts::U20">U20</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-76" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-76" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(arr: <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 20]</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%5BT%3B%2021%5D%3E-for-GenericArray%3CT%2C%20U21%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3C%5BT%3B%2021%5D%3E-for-GenericArray%3CT%2C%20U21%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 21]</a>> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U21.html" title="type typenum::generated::consts::U21">U21</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-80" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-80" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(arr: <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 21]</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%5BT%3B%2022%5D%3E-for-GenericArray%3CT%2C%20U22%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3C%5BT%3B%2022%5D%3E-for-GenericArray%3CT%2C%20U22%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 22]</a>> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U22.html" title="type typenum::generated::consts::U22">U22</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-84" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-84" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(arr: <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 22]</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%5BT%3B%2023%5D%3E-for-GenericArray%3CT%2C%20U23%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3C%5BT%3B%2023%5D%3E-for-GenericArray%3CT%2C%20U23%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 23]</a>> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U23.html" title="type typenum::generated::consts::U23">U23</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-88" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-88" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(arr: <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 23]</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%5BT%3B%2024%5D%3E-for-GenericArray%3CT%2C%20U24%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3C%5BT%3B%2024%5D%3E-for-GenericArray%3CT%2C%20U24%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 24]</a>> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U24.html" title="type typenum::generated::consts::U24">U24</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-92" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-92" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(arr: <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 24]</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%5BT%3B%2025%5D%3E-for-GenericArray%3CT%2C%20U25%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3C%5BT%3B%2025%5D%3E-for-GenericArray%3CT%2C%20U25%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 25]</a>> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U25.html" title="type typenum::generated::consts::U25">U25</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-96" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-96" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(arr: <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 25]</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%5BT%3B%2026%5D%3E-for-GenericArray%3CT%2C%20U26%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3C%5BT%3B%2026%5D%3E-for-GenericArray%3CT%2C%20U26%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 26]</a>> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U26.html" title="type typenum::generated::consts::U26">U26</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-100" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-100" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(arr: <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 26]</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%5BT%3B%2027%5D%3E-for-GenericArray%3CT%2C%20U27%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3C%5BT%3B%2027%5D%3E-for-GenericArray%3CT%2C%20U27%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 27]</a>> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U27.html" title="type typenum::generated::consts::U27">U27</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-104" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-104" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(arr: <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 27]</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%5BT%3B%2028%5D%3E-for-GenericArray%3CT%2C%20U28%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3C%5BT%3B%2028%5D%3E-for-GenericArray%3CT%2C%20U28%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 28]</a>> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U28.html" title="type typenum::generated::consts::U28">U28</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-108" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-108" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(arr: <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 28]</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%5BT%3B%2029%5D%3E-for-GenericArray%3CT%2C%20U29%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3C%5BT%3B%2029%5D%3E-for-GenericArray%3CT%2C%20U29%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 29]</a>> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U29.html" title="type typenum::generated::consts::U29">U29</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-112" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-112" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(arr: <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 29]</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%5BT%3B%203%5D%3E-for-GenericArray%3CT%2C%20U3%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3C%5BT%3B%203%5D%3E-for-GenericArray%3CT%2C%20U3%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 3]</a>> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U3.html" title="type typenum::generated::consts::U3">U3</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-8" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-8" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(arr: <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 3]</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%5BT%3B%2030%5D%3E-for-GenericArray%3CT%2C%20U30%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3C%5BT%3B%2030%5D%3E-for-GenericArray%3CT%2C%20U30%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 30]</a>> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U30.html" title="type typenum::generated::consts::U30">U30</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-116" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-116" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(arr: <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 30]</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%5BT%3B%2031%5D%3E-for-GenericArray%3CT%2C%20U31%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3C%5BT%3B%2031%5D%3E-for-GenericArray%3CT%2C%20U31%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 31]</a>> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U31.html" title="type typenum::generated::consts::U31">U31</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-120" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-120" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(arr: <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 31]</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%5BT%3B%2032%5D%3E-for-GenericArray%3CT%2C%20U32%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3C%5BT%3B%2032%5D%3E-for-GenericArray%3CT%2C%20U32%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 32]</a>> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U32.html" title="type typenum::generated::consts::U32">U32</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-124" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-124" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(arr: <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 32]</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%5BT%3B%204%5D%3E-for-GenericArray%3CT%2C%20U4%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3C%5BT%3B%204%5D%3E-for-GenericArray%3CT%2C%20U4%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 4]</a>> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U4.html" title="type typenum::generated::consts::U4">U4</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-12" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-12" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(arr: <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 4]</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%5BT%3B%205%5D%3E-for-GenericArray%3CT%2C%20U5%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3C%5BT%3B%205%5D%3E-for-GenericArray%3CT%2C%20U5%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 5]</a>> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U5.html" title="type typenum::generated::consts::U5">U5</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-16" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-16" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(arr: <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 5]</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%5BT%3B%206%5D%3E-for-GenericArray%3CT%2C%20U6%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3C%5BT%3B%206%5D%3E-for-GenericArray%3CT%2C%20U6%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 6]</a>> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U6.html" title="type typenum::generated::consts::U6">U6</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-20" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-20" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(arr: <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 6]</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%5BT%3B%207%5D%3E-for-GenericArray%3CT%2C%20U7%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3C%5BT%3B%207%5D%3E-for-GenericArray%3CT%2C%20U7%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 7]</a>> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U7.html" title="type typenum::generated::consts::U7">U7</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-24" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-24" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(arr: <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 7]</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%5BT%3B%208%5D%3E-for-GenericArray%3CT%2C%20U8%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3C%5BT%3B%208%5D%3E-for-GenericArray%3CT%2C%20U8%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 8]</a>> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U8.html" title="type typenum::generated::consts::U8">U8</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-28" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-28" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(arr: <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 8]</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3C%5BT%3B%209%5D%3E-for-GenericArray%3CT%2C%20U9%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3C%5BT%3B%209%5D%3E-for-GenericArray%3CT%2C%20U9%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 9]</a>> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U9.html" title="type typenum::generated::consts::U9">U9</a>></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-32" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-32" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(arr: <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 9]</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3CGenericArray%3CT%2C%20UInt%3CUInt%3CUInt%3CUInt%3CUInt%3CUInt%3CUTerm%2C%20B1%3E%2C%20B0%3E%2C%20B0%3E%2C%20B0%3E%2C%20B0%3E%2C%20B0%3E%3E%3E-for-%5BT%3B%2032%5D" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3CGenericArray%3CT%2C%20UInt%3CUInt%3CUInt%3CUInt%3CUInt%3CUInt%3CUTerm%2C%20B1%3E%2C%20B0%3E%2C%20B0%3E%2C%20B0%3E%2C%20B0%3E%2C%20B0%3E%3E%3E-for-%5BT%3B%2032%5D" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UTerm.html" title="struct typenum::uint::UTerm">UTerm</a>, <a class="struct" href="../typenum/bit/struct.B1.html" title="struct typenum::bit::B1">B1</a>>, <a class="struct" href="../typenum/bit/struct.B0.html" title="struct typenum::bit::B0">B0</a>>, <a class="struct" href="../typenum/bit/struct.B0.html" title="struct typenum::bit::B0">B0</a>>, <a class="struct" href="../typenum/bit/struct.B0.html" title="struct typenum::bit::B0">B0</a>>, <a class="struct" href="../typenum/bit/struct.B0.html" title="struct typenum::bit::B0">B0</a>>, <a class="struct" href="../typenum/bit/struct.B0.html" title="struct typenum::bit::B0">B0</a>>>> for <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 32]</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-125" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-125" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(sel: <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U32.html" title="type typenum::generated::consts::U32">U32</a>>) -> <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 32]</a></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3CGenericArray%3CT%2C%20UInt%3CUInt%3CUInt%3CUInt%3CUInt%3CUTerm%2C%20B1%3E%2C%20B0%3E%2C%20B0%3E%2C%20B0%3E%2C%20B0%3E%3E%3E-for-%5BT%3B%2016%5D" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3CGenericArray%3CT%2C%20UInt%3CUInt%3CUInt%3CUInt%3CUInt%3CUTerm%2C%20B1%3E%2C%20B0%3E%2C%20B0%3E%2C%20B0%3E%2C%20B0%3E%3E%3E-for-%5BT%3B%2016%5D" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UTerm.html" title="struct typenum::uint::UTerm">UTerm</a>, <a class="struct" href="../typenum/bit/struct.B1.html" title="struct typenum::bit::B1">B1</a>>, <a class="struct" href="../typenum/bit/struct.B0.html" title="struct typenum::bit::B0">B0</a>>, <a class="struct" href="../typenum/bit/struct.B0.html" title="struct typenum::bit::B0">B0</a>>, <a class="struct" href="../typenum/bit/struct.B0.html" title="struct typenum::bit::B0">B0</a>>, <a class="struct" href="../typenum/bit/struct.B0.html" title="struct typenum::bit::B0">B0</a>>>> for <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 16]</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-61" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-61" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(sel: <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U16.html" title="type typenum::generated::consts::U16">U16</a>>) -> <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 16]</a></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3CGenericArray%3CT%2C%20UInt%3CUInt%3CUInt%3CUInt%3CUInt%3CUTerm%2C%20B1%3E%2C%20B0%3E%2C%20B0%3E%2C%20B0%3E%2C%20B1%3E%3E%3E-for-%5BT%3B%2017%5D" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3CGenericArray%3CT%2C%20UInt%3CUInt%3CUInt%3CUInt%3CUInt%3CUTerm%2C%20B1%3E%2C%20B0%3E%2C%20B0%3E%2C%20B0%3E%2C%20B1%3E%3E%3E-for-%5BT%3B%2017%5D" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UTerm.html" title="struct typenum::uint::UTerm">UTerm</a>, <a class="struct" href="../typenum/bit/struct.B1.html" title="struct typenum::bit::B1">B1</a>>, <a class="struct" href="../typenum/bit/struct.B0.html" title="struct typenum::bit::B0">B0</a>>, <a class="struct" href="../typenum/bit/struct.B0.html" title="struct typenum::bit::B0">B0</a>>, <a class="struct" href="../typenum/bit/struct.B0.html" title="struct typenum::bit::B0">B0</a>>, <a class="struct" href="../typenum/bit/struct.B1.html" title="struct typenum::bit::B1">B1</a>>>> for <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 17]</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-65" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-65" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(sel: <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U17.html" title="type typenum::generated::consts::U17">U17</a>>) -> <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 17]</a></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3CGenericArray%3CT%2C%20UInt%3CUInt%3CUInt%3CUInt%3CUInt%3CUTerm%2C%20B1%3E%2C%20B0%3E%2C%20B0%3E%2C%20B1%3E%2C%20B0%3E%3E%3E-for-%5BT%3B%2018%5D" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3CGenericArray%3CT%2C%20UInt%3CUInt%3CUInt%3CUInt%3CUInt%3CUTerm%2C%20B1%3E%2C%20B0%3E%2C%20B0%3E%2C%20B1%3E%2C%20B0%3E%3E%3E-for-%5BT%3B%2018%5D" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UTerm.html" title="struct typenum::uint::UTerm">UTerm</a>, <a class="struct" href="../typenum/bit/struct.B1.html" title="struct typenum::bit::B1">B1</a>>, <a class="struct" href="../typenum/bit/struct.B0.html" title="struct typenum::bit::B0">B0</a>>, <a class="struct" href="../typenum/bit/struct.B0.html" title="struct typenum::bit::B0">B0</a>>, <a class="struct" href="../typenum/bit/struct.B1.html" title="struct typenum::bit::B1">B1</a>>, <a class="struct" href="../typenum/bit/struct.B0.html" title="struct typenum::bit::B0">B0</a>>>> for <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 18]</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-69" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-69" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(sel: <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U18.html" title="type typenum::generated::consts::U18">U18</a>>) -> <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 18]</a></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3CGenericArray%3CT%2C%20UInt%3CUInt%3CUInt%3CUInt%3CUInt%3CUTerm%2C%20B1%3E%2C%20B0%3E%2C%20B0%3E%2C%20B1%3E%2C%20B1%3E%3E%3E-for-%5BT%3B%2019%5D" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3CGenericArray%3CT%2C%20UInt%3CUInt%3CUInt%3CUInt%3CUInt%3CUTerm%2C%20B1%3E%2C%20B0%3E%2C%20B0%3E%2C%20B1%3E%2C%20B1%3E%3E%3E-for-%5BT%3B%2019%5D" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UTerm.html" title="struct typenum::uint::UTerm">UTerm</a>, <a class="struct" href="../typenum/bit/struct.B1.html" title="struct typenum::bit::B1">B1</a>>, <a class="struct" href="../typenum/bit/struct.B0.html" title="struct typenum::bit::B0">B0</a>>, <a class="struct" href="../typenum/bit/struct.B0.html" title="struct typenum::bit::B0">B0</a>>, <a class="struct" href="../typenum/bit/struct.B1.html" title="struct typenum::bit::B1">B1</a>>, <a class="struct" href="../typenum/bit/struct.B1.html" title="struct typenum::bit::B1">B1</a>>>> for <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 19]</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-73" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-73" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(sel: <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U19.html" title="type typenum::generated::consts::U19">U19</a>>) -> <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 19]</a></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3CGenericArray%3CT%2C%20UInt%3CUInt%3CUInt%3CUInt%3CUInt%3CUTerm%2C%20B1%3E%2C%20B0%3E%2C%20B1%3E%2C%20B0%3E%2C%20B0%3E%3E%3E-for-%5BT%3B%2020%5D" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3CGenericArray%3CT%2C%20UInt%3CUInt%3CUInt%3CUInt%3CUInt%3CUTerm%2C%20B1%3E%2C%20B0%3E%2C%20B1%3E%2C%20B0%3E%2C%20B0%3E%3E%3E-for-%5BT%3B%2020%5D" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UTerm.html" title="struct typenum::uint::UTerm">UTerm</a>, <a class="struct" href="../typenum/bit/struct.B1.html" title="struct typenum::bit::B1">B1</a>>, <a class="struct" href="../typenum/bit/struct.B0.html" title="struct typenum::bit::B0">B0</a>>, <a class="struct" href="../typenum/bit/struct.B1.html" title="struct typenum::bit::B1">B1</a>>, <a class="struct" href="../typenum/bit/struct.B0.html" title="struct typenum::bit::B0">B0</a>>, <a class="struct" href="../typenum/bit/struct.B0.html" title="struct typenum::bit::B0">B0</a>>>> for <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 20]</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-77" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-77" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(sel: <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U20.html" title="type typenum::generated::consts::U20">U20</a>>) -> <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 20]</a></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3CGenericArray%3CT%2C%20UInt%3CUInt%3CUInt%3CUInt%3CUInt%3CUTerm%2C%20B1%3E%2C%20B0%3E%2C%20B1%3E%2C%20B0%3E%2C%20B1%3E%3E%3E-for-%5BT%3B%2021%5D" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3CGenericArray%3CT%2C%20UInt%3CUInt%3CUInt%3CUInt%3CUInt%3CUTerm%2C%20B1%3E%2C%20B0%3E%2C%20B1%3E%2C%20B0%3E%2C%20B1%3E%3E%3E-for-%5BT%3B%2021%5D" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UTerm.html" title="struct typenum::uint::UTerm">UTerm</a>, <a class="struct" href="../typenum/bit/struct.B1.html" title="struct typenum::bit::B1">B1</a>>, <a class="struct" href="../typenum/bit/struct.B0.html" title="struct typenum::bit::B0">B0</a>>, <a class="struct" href="../typenum/bit/struct.B1.html" title="struct typenum::bit::B1">B1</a>>, <a class="struct" href="../typenum/bit/struct.B0.html" title="struct typenum::bit::B0">B0</a>>, <a class="struct" href="../typenum/bit/struct.B1.html" title="struct typenum::bit::B1">B1</a>>>> for <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 21]</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-81" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-81" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(sel: <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U21.html" title="type typenum::generated::consts::U21">U21</a>>) -> <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 21]</a></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3CGenericArray%3CT%2C%20UInt%3CUInt%3CUInt%3CUInt%3CUInt%3CUTerm%2C%20B1%3E%2C%20B0%3E%2C%20B1%3E%2C%20B1%3E%2C%20B0%3E%3E%3E-for-%5BT%3B%2022%5D" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3CGenericArray%3CT%2C%20UInt%3CUInt%3CUInt%3CUInt%3CUInt%3CUTerm%2C%20B1%3E%2C%20B0%3E%2C%20B1%3E%2C%20B1%3E%2C%20B0%3E%3E%3E-for-%5BT%3B%2022%5D" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UTerm.html" title="struct typenum::uint::UTerm">UTerm</a>, <a class="struct" href="../typenum/bit/struct.B1.html" title="struct typenum::bit::B1">B1</a>>, <a class="struct" href="../typenum/bit/struct.B0.html" title="struct typenum::bit::B0">B0</a>>, <a class="struct" href="../typenum/bit/struct.B1.html" title="struct typenum::bit::B1">B1</a>>, <a class="struct" href="../typenum/bit/struct.B1.html" title="struct typenum::bit::B1">B1</a>>, <a class="struct" href="../typenum/bit/struct.B0.html" title="struct typenum::bit::B0">B0</a>>>> for <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 22]</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-85" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-85" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(sel: <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U22.html" title="type typenum::generated::consts::U22">U22</a>>) -> <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 22]</a></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3CGenericArray%3CT%2C%20UInt%3CUInt%3CUInt%3CUInt%3CUInt%3CUTerm%2C%20B1%3E%2C%20B0%3E%2C%20B1%3E%2C%20B1%3E%2C%20B1%3E%3E%3E-for-%5BT%3B%2023%5D" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3CGenericArray%3CT%2C%20UInt%3CUInt%3CUInt%3CUInt%3CUInt%3CUTerm%2C%20B1%3E%2C%20B0%3E%2C%20B1%3E%2C%20B1%3E%2C%20B1%3E%3E%3E-for-%5BT%3B%2023%5D" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UTerm.html" title="struct typenum::uint::UTerm">UTerm</a>, <a class="struct" href="../typenum/bit/struct.B1.html" title="struct typenum::bit::B1">B1</a>>, <a class="struct" href="../typenum/bit/struct.B0.html" title="struct typenum::bit::B0">B0</a>>, <a class="struct" href="../typenum/bit/struct.B1.html" title="struct typenum::bit::B1">B1</a>>, <a class="struct" href="../typenum/bit/struct.B1.html" title="struct typenum::bit::B1">B1</a>>, <a class="struct" href="../typenum/bit/struct.B1.html" title="struct typenum::bit::B1">B1</a>>>> for <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 23]</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-89" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-89" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(sel: <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U23.html" title="type typenum::generated::consts::U23">U23</a>>) -> <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 23]</a></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3CGenericArray%3CT%2C%20UInt%3CUInt%3CUInt%3CUInt%3CUInt%3CUTerm%2C%20B1%3E%2C%20B1%3E%2C%20B0%3E%2C%20B0%3E%2C%20B0%3E%3E%3E-for-%5BT%3B%2024%5D" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3CGenericArray%3CT%2C%20UInt%3CUInt%3CUInt%3CUInt%3CUInt%3CUTerm%2C%20B1%3E%2C%20B1%3E%2C%20B0%3E%2C%20B0%3E%2C%20B0%3E%3E%3E-for-%5BT%3B%2024%5D" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UTerm.html" title="struct typenum::uint::UTerm">UTerm</a>, <a class="struct" href="../typenum/bit/struct.B1.html" title="struct typenum::bit::B1">B1</a>>, <a class="struct" href="../typenum/bit/struct.B1.html" title="struct typenum::bit::B1">B1</a>>, <a class="struct" href="../typenum/bit/struct.B0.html" title="struct typenum::bit::B0">B0</a>>, <a class="struct" href="../typenum/bit/struct.B0.html" title="struct typenum::bit::B0">B0</a>>, <a class="struct" href="../typenum/bit/struct.B0.html" title="struct typenum::bit::B0">B0</a>>>> for <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 24]</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-93" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-93" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(sel: <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U24.html" title="type typenum::generated::consts::U24">U24</a>>) -> <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 24]</a></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3CGenericArray%3CT%2C%20UInt%3CUInt%3CUInt%3CUInt%3CUInt%3CUTerm%2C%20B1%3E%2C%20B1%3E%2C%20B0%3E%2C%20B0%3E%2C%20B1%3E%3E%3E-for-%5BT%3B%2025%5D" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3CGenericArray%3CT%2C%20UInt%3CUInt%3CUInt%3CUInt%3CUInt%3CUTerm%2C%20B1%3E%2C%20B1%3E%2C%20B0%3E%2C%20B0%3E%2C%20B1%3E%3E%3E-for-%5BT%3B%2025%5D" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UTerm.html" title="struct typenum::uint::UTerm">UTerm</a>, <a class="struct" href="../typenum/bit/struct.B1.html" title="struct typenum::bit::B1">B1</a>>, <a class="struct" href="../typenum/bit/struct.B1.html" title="struct typenum::bit::B1">B1</a>>, <a class="struct" href="../typenum/bit/struct.B0.html" title="struct typenum::bit::B0">B0</a>>, <a class="struct" href="../typenum/bit/struct.B0.html" title="struct typenum::bit::B0">B0</a>>, <a class="struct" href="../typenum/bit/struct.B1.html" title="struct typenum::bit::B1">B1</a>>>> for <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 25]</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-97" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-97" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(sel: <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U25.html" title="type typenum::generated::consts::U25">U25</a>>) -> <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 25]</a></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3CGenericArray%3CT%2C%20UInt%3CUInt%3CUInt%3CUInt%3CUInt%3CUTerm%2C%20B1%3E%2C%20B1%3E%2C%20B0%3E%2C%20B1%3E%2C%20B0%3E%3E%3E-for-%5BT%3B%2026%5D" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3CGenericArray%3CT%2C%20UInt%3CUInt%3CUInt%3CUInt%3CUInt%3CUTerm%2C%20B1%3E%2C%20B1%3E%2C%20B0%3E%2C%20B1%3E%2C%20B0%3E%3E%3E-for-%5BT%3B%2026%5D" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UTerm.html" title="struct typenum::uint::UTerm">UTerm</a>, <a class="struct" href="../typenum/bit/struct.B1.html" title="struct typenum::bit::B1">B1</a>>, <a class="struct" href="../typenum/bit/struct.B1.html" title="struct typenum::bit::B1">B1</a>>, <a class="struct" href="../typenum/bit/struct.B0.html" title="struct typenum::bit::B0">B0</a>>, <a class="struct" href="../typenum/bit/struct.B1.html" title="struct typenum::bit::B1">B1</a>>, <a class="struct" href="../typenum/bit/struct.B0.html" title="struct typenum::bit::B0">B0</a>>>> for <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 26]</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-101" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-101" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(sel: <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U26.html" title="type typenum::generated::consts::U26">U26</a>>) -> <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 26]</a></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3CGenericArray%3CT%2C%20UInt%3CUInt%3CUInt%3CUInt%3CUInt%3CUTerm%2C%20B1%3E%2C%20B1%3E%2C%20B0%3E%2C%20B1%3E%2C%20B1%3E%3E%3E-for-%5BT%3B%2027%5D" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3CGenericArray%3CT%2C%20UInt%3CUInt%3CUInt%3CUInt%3CUInt%3CUTerm%2C%20B1%3E%2C%20B1%3E%2C%20B0%3E%2C%20B1%3E%2C%20B1%3E%3E%3E-for-%5BT%3B%2027%5D" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UTerm.html" title="struct typenum::uint::UTerm">UTerm</a>, <a class="struct" href="../typenum/bit/struct.B1.html" title="struct typenum::bit::B1">B1</a>>, <a class="struct" href="../typenum/bit/struct.B1.html" title="struct typenum::bit::B1">B1</a>>, <a class="struct" href="../typenum/bit/struct.B0.html" title="struct typenum::bit::B0">B0</a>>, <a class="struct" href="../typenum/bit/struct.B1.html" title="struct typenum::bit::B1">B1</a>>, <a class="struct" href="../typenum/bit/struct.B1.html" title="struct typenum::bit::B1">B1</a>>>> for <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 27]</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-105" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-105" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(sel: <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U27.html" title="type typenum::generated::consts::U27">U27</a>>) -> <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 27]</a></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3CGenericArray%3CT%2C%20UInt%3CUInt%3CUInt%3CUInt%3CUInt%3CUTerm%2C%20B1%3E%2C%20B1%3E%2C%20B1%3E%2C%20B0%3E%2C%20B0%3E%3E%3E-for-%5BT%3B%2028%5D" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3CGenericArray%3CT%2C%20UInt%3CUInt%3CUInt%3CUInt%3CUInt%3CUTerm%2C%20B1%3E%2C%20B1%3E%2C%20B1%3E%2C%20B0%3E%2C%20B0%3E%3E%3E-for-%5BT%3B%2028%5D" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UTerm.html" title="struct typenum::uint::UTerm">UTerm</a>, <a class="struct" href="../typenum/bit/struct.B1.html" title="struct typenum::bit::B1">B1</a>>, <a class="struct" href="../typenum/bit/struct.B1.html" title="struct typenum::bit::B1">B1</a>>, <a class="struct" href="../typenum/bit/struct.B1.html" title="struct typenum::bit::B1">B1</a>>, <a class="struct" href="../typenum/bit/struct.B0.html" title="struct typenum::bit::B0">B0</a>>, <a class="struct" href="../typenum/bit/struct.B0.html" title="struct typenum::bit::B0">B0</a>>>> for <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 28]</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-109" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-109" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(sel: <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U28.html" title="type typenum::generated::consts::U28">U28</a>>) -> <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 28]</a></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3CGenericArray%3CT%2C%20UInt%3CUInt%3CUInt%3CUInt%3CUInt%3CUTerm%2C%20B1%3E%2C%20B1%3E%2C%20B1%3E%2C%20B0%3E%2C%20B1%3E%3E%3E-for-%5BT%3B%2029%5D" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3CGenericArray%3CT%2C%20UInt%3CUInt%3CUInt%3CUInt%3CUInt%3CUTerm%2C%20B1%3E%2C%20B1%3E%2C%20B1%3E%2C%20B0%3E%2C%20B1%3E%3E%3E-for-%5BT%3B%2029%5D" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UTerm.html" title="struct typenum::uint::UTerm">UTerm</a>, <a class="struct" href="../typenum/bit/struct.B1.html" title="struct typenum::bit::B1">B1</a>>, <a class="struct" href="../typenum/bit/struct.B1.html" title="struct typenum::bit::B1">B1</a>>, <a class="struct" href="../typenum/bit/struct.B1.html" title="struct typenum::bit::B1">B1</a>>, <a class="struct" href="../typenum/bit/struct.B0.html" title="struct typenum::bit::B0">B0</a>>, <a class="struct" href="../typenum/bit/struct.B1.html" title="struct typenum::bit::B1">B1</a>>>> for <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 29]</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-113" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-113" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(sel: <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U29.html" title="type typenum::generated::consts::U29">U29</a>>) -> <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 29]</a></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3CGenericArray%3CT%2C%20UInt%3CUInt%3CUInt%3CUInt%3CUInt%3CUTerm%2C%20B1%3E%2C%20B1%3E%2C%20B1%3E%2C%20B1%3E%2C%20B0%3E%3E%3E-for-%5BT%3B%2030%5D" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3CGenericArray%3CT%2C%20UInt%3CUInt%3CUInt%3CUInt%3CUInt%3CUTerm%2C%20B1%3E%2C%20B1%3E%2C%20B1%3E%2C%20B1%3E%2C%20B0%3E%3E%3E-for-%5BT%3B%2030%5D" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UTerm.html" title="struct typenum::uint::UTerm">UTerm</a>, <a class="struct" href="../typenum/bit/struct.B1.html" title="struct typenum::bit::B1">B1</a>>, <a class="struct" href="../typenum/bit/struct.B1.html" title="struct typenum::bit::B1">B1</a>>, <a class="struct" href="../typenum/bit/struct.B1.html" title="struct typenum::bit::B1">B1</a>>, <a class="struct" href="../typenum/bit/struct.B1.html" title="struct typenum::bit::B1">B1</a>>, <a class="struct" href="../typenum/bit/struct.B0.html" title="struct typenum::bit::B0">B0</a>>>> for <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 30]</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-117" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-117" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(sel: <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U30.html" title="type typenum::generated::consts::U30">U30</a>>) -> <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 30]</a></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3CGenericArray%3CT%2C%20UInt%3CUInt%3CUInt%3CUInt%3CUInt%3CUTerm%2C%20B1%3E%2C%20B1%3E%2C%20B1%3E%2C%20B1%3E%2C%20B1%3E%3E%3E-for-%5BT%3B%2031%5D" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3CGenericArray%3CT%2C%20UInt%3CUInt%3CUInt%3CUInt%3CUInt%3CUTerm%2C%20B1%3E%2C%20B1%3E%2C%20B1%3E%2C%20B1%3E%2C%20B1%3E%3E%3E-for-%5BT%3B%2031%5D" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UTerm.html" title="struct typenum::uint::UTerm">UTerm</a>, <a class="struct" href="../typenum/bit/struct.B1.html" title="struct typenum::bit::B1">B1</a>>, <a class="struct" href="../typenum/bit/struct.B1.html" title="struct typenum::bit::B1">B1</a>>, <a class="struct" href="../typenum/bit/struct.B1.html" title="struct typenum::bit::B1">B1</a>>, <a class="struct" href="../typenum/bit/struct.B1.html" title="struct typenum::bit::B1">B1</a>>, <a class="struct" href="../typenum/bit/struct.B1.html" title="struct typenum::bit::B1">B1</a>>>> for <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 31]</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-121" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-121" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(sel: <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U31.html" title="type typenum::generated::consts::U31">U31</a>>) -> <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 31]</a></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3CGenericArray%3CT%2C%20UInt%3CUInt%3CUInt%3CUInt%3CUTerm%2C%20B1%3E%2C%20B0%3E%2C%20B0%3E%2C%20B0%3E%3E%3E-for-%5BT%3B%208%5D" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3CGenericArray%3CT%2C%20UInt%3CUInt%3CUInt%3CUInt%3CUTerm%2C%20B1%3E%2C%20B0%3E%2C%20B0%3E%2C%20B0%3E%3E%3E-for-%5BT%3B%208%5D" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UTerm.html" title="struct typenum::uint::UTerm">UTerm</a>, <a class="struct" href="../typenum/bit/struct.B1.html" title="struct typenum::bit::B1">B1</a>>, <a class="struct" href="../typenum/bit/struct.B0.html" title="struct typenum::bit::B0">B0</a>>, <a class="struct" href="../typenum/bit/struct.B0.html" title="struct typenum::bit::B0">B0</a>>, <a class="struct" href="../typenum/bit/struct.B0.html" title="struct typenum::bit::B0">B0</a>>>> for <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 8]</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-29" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-29" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(sel: <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U8.html" title="type typenum::generated::consts::U8">U8</a>>) -> <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 8]</a></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3CGenericArray%3CT%2C%20UInt%3CUInt%3CUInt%3CUInt%3CUTerm%2C%20B1%3E%2C%20B0%3E%2C%20B0%3E%2C%20B1%3E%3E%3E-for-%5BT%3B%209%5D" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3CGenericArray%3CT%2C%20UInt%3CUInt%3CUInt%3CUInt%3CUTerm%2C%20B1%3E%2C%20B0%3E%2C%20B0%3E%2C%20B1%3E%3E%3E-for-%5BT%3B%209%5D" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UTerm.html" title="struct typenum::uint::UTerm">UTerm</a>, <a class="struct" href="../typenum/bit/struct.B1.html" title="struct typenum::bit::B1">B1</a>>, <a class="struct" href="../typenum/bit/struct.B0.html" title="struct typenum::bit::B0">B0</a>>, <a class="struct" href="../typenum/bit/struct.B0.html" title="struct typenum::bit::B0">B0</a>>, <a class="struct" href="../typenum/bit/struct.B1.html" title="struct typenum::bit::B1">B1</a>>>> for <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 9]</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-33" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-33" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(sel: <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U9.html" title="type typenum::generated::consts::U9">U9</a>>) -> <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 9]</a></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3CGenericArray%3CT%2C%20UInt%3CUInt%3CUInt%3CUInt%3CUTerm%2C%20B1%3E%2C%20B0%3E%2C%20B1%3E%2C%20B0%3E%3E%3E-for-%5BT%3B%2010%5D" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3CGenericArray%3CT%2C%20UInt%3CUInt%3CUInt%3CUInt%3CUTerm%2C%20B1%3E%2C%20B0%3E%2C%20B1%3E%2C%20B0%3E%3E%3E-for-%5BT%3B%2010%5D" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UTerm.html" title="struct typenum::uint::UTerm">UTerm</a>, <a class="struct" href="../typenum/bit/struct.B1.html" title="struct typenum::bit::B1">B1</a>>, <a class="struct" href="../typenum/bit/struct.B0.html" title="struct typenum::bit::B0">B0</a>>, <a class="struct" href="../typenum/bit/struct.B1.html" title="struct typenum::bit::B1">B1</a>>, <a class="struct" href="../typenum/bit/struct.B0.html" title="struct typenum::bit::B0">B0</a>>>> for <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 10]</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-37" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-37" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(sel: <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U10.html" title="type typenum::generated::consts::U10">U10</a>>) -> <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 10]</a></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3CGenericArray%3CT%2C%20UInt%3CUInt%3CUInt%3CUInt%3CUTerm%2C%20B1%3E%2C%20B0%3E%2C%20B1%3E%2C%20B1%3E%3E%3E-for-%5BT%3B%2011%5D" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3CGenericArray%3CT%2C%20UInt%3CUInt%3CUInt%3CUInt%3CUTerm%2C%20B1%3E%2C%20B0%3E%2C%20B1%3E%2C%20B1%3E%3E%3E-for-%5BT%3B%2011%5D" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UTerm.html" title="struct typenum::uint::UTerm">UTerm</a>, <a class="struct" href="../typenum/bit/struct.B1.html" title="struct typenum::bit::B1">B1</a>>, <a class="struct" href="../typenum/bit/struct.B0.html" title="struct typenum::bit::B0">B0</a>>, <a class="struct" href="../typenum/bit/struct.B1.html" title="struct typenum::bit::B1">B1</a>>, <a class="struct" href="../typenum/bit/struct.B1.html" title="struct typenum::bit::B1">B1</a>>>> for <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 11]</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-41" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-41" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(sel: <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U11.html" title="type typenum::generated::consts::U11">U11</a>>) -> <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 11]</a></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3CGenericArray%3CT%2C%20UInt%3CUInt%3CUInt%3CUInt%3CUTerm%2C%20B1%3E%2C%20B1%3E%2C%20B0%3E%2C%20B0%3E%3E%3E-for-%5BT%3B%2012%5D" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3CGenericArray%3CT%2C%20UInt%3CUInt%3CUInt%3CUInt%3CUTerm%2C%20B1%3E%2C%20B1%3E%2C%20B0%3E%2C%20B0%3E%3E%3E-for-%5BT%3B%2012%5D" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UTerm.html" title="struct typenum::uint::UTerm">UTerm</a>, <a class="struct" href="../typenum/bit/struct.B1.html" title="struct typenum::bit::B1">B1</a>>, <a class="struct" href="../typenum/bit/struct.B1.html" title="struct typenum::bit::B1">B1</a>>, <a class="struct" href="../typenum/bit/struct.B0.html" title="struct typenum::bit::B0">B0</a>>, <a class="struct" href="../typenum/bit/struct.B0.html" title="struct typenum::bit::B0">B0</a>>>> for <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 12]</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-45" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-45" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(sel: <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U12.html" title="type typenum::generated::consts::U12">U12</a>>) -> <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 12]</a></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3CGenericArray%3CT%2C%20UInt%3CUInt%3CUInt%3CUInt%3CUTerm%2C%20B1%3E%2C%20B1%3E%2C%20B0%3E%2C%20B1%3E%3E%3E-for-%5BT%3B%2013%5D" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3CGenericArray%3CT%2C%20UInt%3CUInt%3CUInt%3CUInt%3CUTerm%2C%20B1%3E%2C%20B1%3E%2C%20B0%3E%2C%20B1%3E%3E%3E-for-%5BT%3B%2013%5D" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UTerm.html" title="struct typenum::uint::UTerm">UTerm</a>, <a class="struct" href="../typenum/bit/struct.B1.html" title="struct typenum::bit::B1">B1</a>>, <a class="struct" href="../typenum/bit/struct.B1.html" title="struct typenum::bit::B1">B1</a>>, <a class="struct" href="../typenum/bit/struct.B0.html" title="struct typenum::bit::B0">B0</a>>, <a class="struct" href="../typenum/bit/struct.B1.html" title="struct typenum::bit::B1">B1</a>>>> for <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 13]</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-49" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-49" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(sel: <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U13.html" title="type typenum::generated::consts::U13">U13</a>>) -> <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 13]</a></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3CGenericArray%3CT%2C%20UInt%3CUInt%3CUInt%3CUInt%3CUTerm%2C%20B1%3E%2C%20B1%3E%2C%20B1%3E%2C%20B0%3E%3E%3E-for-%5BT%3B%2014%5D" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3CGenericArray%3CT%2C%20UInt%3CUInt%3CUInt%3CUInt%3CUTerm%2C%20B1%3E%2C%20B1%3E%2C%20B1%3E%2C%20B0%3E%3E%3E-for-%5BT%3B%2014%5D" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UTerm.html" title="struct typenum::uint::UTerm">UTerm</a>, <a class="struct" href="../typenum/bit/struct.B1.html" title="struct typenum::bit::B1">B1</a>>, <a class="struct" href="../typenum/bit/struct.B1.html" title="struct typenum::bit::B1">B1</a>>, <a class="struct" href="../typenum/bit/struct.B1.html" title="struct typenum::bit::B1">B1</a>>, <a class="struct" href="../typenum/bit/struct.B0.html" title="struct typenum::bit::B0">B0</a>>>> for <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 14]</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-53" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-53" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(sel: <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U14.html" title="type typenum::generated::consts::U14">U14</a>>) -> <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 14]</a></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3CGenericArray%3CT%2C%20UInt%3CUInt%3CUInt%3CUInt%3CUTerm%2C%20B1%3E%2C%20B1%3E%2C%20B1%3E%2C%20B1%3E%3E%3E-for-%5BT%3B%2015%5D" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3CGenericArray%3CT%2C%20UInt%3CUInt%3CUInt%3CUInt%3CUTerm%2C%20B1%3E%2C%20B1%3E%2C%20B1%3E%2C%20B1%3E%3E%3E-for-%5BT%3B%2015%5D" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UTerm.html" title="struct typenum::uint::UTerm">UTerm</a>, <a class="struct" href="../typenum/bit/struct.B1.html" title="struct typenum::bit::B1">B1</a>>, <a class="struct" href="../typenum/bit/struct.B1.html" title="struct typenum::bit::B1">B1</a>>, <a class="struct" href="../typenum/bit/struct.B1.html" title="struct typenum::bit::B1">B1</a>>, <a class="struct" href="../typenum/bit/struct.B1.html" title="struct typenum::bit::B1">B1</a>>>> for <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 15]</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-57" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-57" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(sel: <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U15.html" title="type typenum::generated::consts::U15">U15</a>>) -> <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 15]</a></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3CGenericArray%3CT%2C%20UInt%3CUInt%3CUInt%3CUTerm%2C%20B1%3E%2C%20B0%3E%2C%20B0%3E%3E%3E-for-%5BT%3B%204%5D" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3CGenericArray%3CT%2C%20UInt%3CUInt%3CUInt%3CUTerm%2C%20B1%3E%2C%20B0%3E%2C%20B0%3E%3E%3E-for-%5BT%3B%204%5D" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UTerm.html" title="struct typenum::uint::UTerm">UTerm</a>, <a class="struct" href="../typenum/bit/struct.B1.html" title="struct typenum::bit::B1">B1</a>>, <a class="struct" href="../typenum/bit/struct.B0.html" title="struct typenum::bit::B0">B0</a>>, <a class="struct" href="../typenum/bit/struct.B0.html" title="struct typenum::bit::B0">B0</a>>>> for <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 4]</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-13" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-13" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(sel: <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U4.html" title="type typenum::generated::consts::U4">U4</a>>) -> <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 4]</a></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3CGenericArray%3CT%2C%20UInt%3CUInt%3CUInt%3CUTerm%2C%20B1%3E%2C%20B0%3E%2C%20B1%3E%3E%3E-for-%5BT%3B%205%5D" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3CGenericArray%3CT%2C%20UInt%3CUInt%3CUInt%3CUTerm%2C%20B1%3E%2C%20B0%3E%2C%20B1%3E%3E%3E-for-%5BT%3B%205%5D" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UTerm.html" title="struct typenum::uint::UTerm">UTerm</a>, <a class="struct" href="../typenum/bit/struct.B1.html" title="struct typenum::bit::B1">B1</a>>, <a class="struct" href="../typenum/bit/struct.B0.html" title="struct typenum::bit::B0">B0</a>>, <a class="struct" href="../typenum/bit/struct.B1.html" title="struct typenum::bit::B1">B1</a>>>> for <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 5]</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-17" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-17" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(sel: <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U5.html" title="type typenum::generated::consts::U5">U5</a>>) -> <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 5]</a></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3CGenericArray%3CT%2C%20UInt%3CUInt%3CUInt%3CUTerm%2C%20B1%3E%2C%20B1%3E%2C%20B0%3E%3E%3E-for-%5BT%3B%206%5D" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3CGenericArray%3CT%2C%20UInt%3CUInt%3CUInt%3CUTerm%2C%20B1%3E%2C%20B1%3E%2C%20B0%3E%3E%3E-for-%5BT%3B%206%5D" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UTerm.html" title="struct typenum::uint::UTerm">UTerm</a>, <a class="struct" href="../typenum/bit/struct.B1.html" title="struct typenum::bit::B1">B1</a>>, <a class="struct" href="../typenum/bit/struct.B1.html" title="struct typenum::bit::B1">B1</a>>, <a class="struct" href="../typenum/bit/struct.B0.html" title="struct typenum::bit::B0">B0</a>>>> for <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 6]</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-21" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-21" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(sel: <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U6.html" title="type typenum::generated::consts::U6">U6</a>>) -> <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 6]</a></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3CGenericArray%3CT%2C%20UInt%3CUInt%3CUInt%3CUTerm%2C%20B1%3E%2C%20B1%3E%2C%20B1%3E%3E%3E-for-%5BT%3B%207%5D" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3CGenericArray%3CT%2C%20UInt%3CUInt%3CUInt%3CUTerm%2C%20B1%3E%2C%20B1%3E%2C%20B1%3E%3E%3E-for-%5BT%3B%207%5D" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UTerm.html" title="struct typenum::uint::UTerm">UTerm</a>, <a class="struct" href="../typenum/bit/struct.B1.html" title="struct typenum::bit::B1">B1</a>>, <a class="struct" href="../typenum/bit/struct.B1.html" title="struct typenum::bit::B1">B1</a>>, <a class="struct" href="../typenum/bit/struct.B1.html" title="struct typenum::bit::B1">B1</a>>>> for <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 7]</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-25" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-25" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(sel: <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U7.html" title="type typenum::generated::consts::U7">U7</a>>) -> <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 7]</a></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3CGenericArray%3CT%2C%20UInt%3CUInt%3CUTerm%2C%20B1%3E%2C%20B0%3E%3E%3E-for-%5BT%3B%202%5D" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3CGenericArray%3CT%2C%20UInt%3CUInt%3CUTerm%2C%20B1%3E%2C%20B0%3E%3E%3E-for-%5BT%3B%202%5D" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UTerm.html" title="struct typenum::uint::UTerm">UTerm</a>, <a class="struct" href="../typenum/bit/struct.B1.html" title="struct typenum::bit::B1">B1</a>>, <a class="struct" href="../typenum/bit/struct.B0.html" title="struct typenum::bit::B0">B0</a>>>> for <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 2]</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-5" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-5" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(sel: <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U2.html" title="type typenum::generated::consts::U2">U2</a>>) -> <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 2]</a></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3CGenericArray%3CT%2C%20UInt%3CUInt%3CUTerm%2C%20B1%3E%2C%20B1%3E%3E%3E-for-%5BT%3B%203%5D" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3CGenericArray%3CT%2C%20UInt%3CUInt%3CUTerm%2C%20B1%3E%2C%20B1%3E%3E%3E-for-%5BT%3B%203%5D" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UTerm.html" title="struct typenum::uint::UTerm">UTerm</a>, <a class="struct" href="../typenum/bit/struct.B1.html" title="struct typenum::bit::B1">B1</a>>, <a class="struct" href="../typenum/bit/struct.B1.html" title="struct typenum::bit::B1">B1</a>>>> for <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 3]</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-9" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-9" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(sel: <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U3.html" title="type typenum::generated::consts::U3">U3</a>>) -> <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 3]</a></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3CGenericArray%3CT%2C%20UInt%3CUTerm%2C%20B1%3E%3E%3E-for-%5BT%3B%201%5D" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#impl-From%3CGenericArray%3CT%2C%20UInt%3CUTerm%2C%20B1%3E%3E%3E-for-%5BT%3B%201%5D" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="struct" href="../typenum/uint/struct.UInt.html" title="struct typenum::uint::UInt">UInt</a><<a class="struct" href="../typenum/uint/struct.UTerm.html" title="struct typenum::uint::UTerm">UTerm</a>, <a class="struct" href="../typenum/bit/struct.B1.html" title="struct typenum::bit::B1">B1</a>>>> for <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 1]</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#183-216">source</a><a href="#method.from-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(sel: <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <a class="type" href="../typenum/generated/consts/type.U1.html" title="type typenum::generated::consts::U1">U1</a>>) -> <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.array.html">[T; 1]</a></h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-FromIterator%3CT%3E-for-GenericArray%3CT%2C%20N%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/lib.rs.html#330-360">source</a><a href="#impl-FromIterator%3CT%3E-for-GenericArray%3CT%2C%20N%3E" class="anchor">§</a><h3 class="code-header">impl<T, N> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/iter/traits/collect/trait.FromIterator.html" title="trait core::iter::traits::collect::FromIterator">FromIterator</a><T> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, N><span class="where fmt-newline">where<br> N: <a class="trait" href="trait.ArrayLength.html" title="trait generic_array::ArrayLength">ArrayLength</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from_iter" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/lib.rs.html#334-359">source</a><a href="#method.from_iter" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/iter/traits/collect/trait.FromIterator.html#tymethod.from_iter" class="fn">from_iter</a><I>(iter: I) -> <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, N><span class="where fmt-newline">where<br> I: <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a><Item = T>,</span></h4></section></summary><div class='docblock'>Creates a value from an iterator. <a href="https://doc.rust-lang.org/1.67.0/core/iter/traits/collect/trait.FromIterator.html#tymethod.from_iter">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-FunctionalSequence%3CT%3E-for-GenericArray%3CT%2C%20N%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/lib.rs.html#468-524">source</a><a href="#impl-FunctionalSequence%3CT%3E-for-GenericArray%3CT%2C%20N%3E" class="anchor">§</a><h3 class="code-header">impl<T, N> <a class="trait" href="functional/trait.FunctionalSequence.html" title="trait generic_array::functional::FunctionalSequence">FunctionalSequence</a><T> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, N><span class="where fmt-newline">where<br> N: <a class="trait" href="trait.ArrayLength.html" title="trait generic_array::ArrayLength">ArrayLength</a><T>,<br> Self: <a class="trait" href="sequence/trait.GenericSequence.html" title="trait generic_array::sequence::GenericSequence">GenericSequence</a><T, Item = T, Length = N>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.map" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/lib.rs.html#473-492">source</a><a href="#method.map" class="anchor">§</a><h4 class="code-header">fn <a href="functional/trait.FunctionalSequence.html#method.map" class="fn">map</a><U, F>(self, f: F) -> <a class="type" href="functional/type.MappedSequence.html" title="type generic_array::functional::MappedSequence">MappedSequence</a><Self, T, U><span class="where fmt-newline">where<br> Self::<a class="associatedtype" href="sequence/trait.GenericSequence.html#associatedtype.Length" title="type generic_array::sequence::GenericSequence::Length">Length</a>: <a class="trait" href="trait.ArrayLength.html" title="trait generic_array::ArrayLength">ArrayLength</a><U>,<br> Self: <a class="trait" href="functional/trait.MappedGenericSequence.html" title="trait generic_array::functional::MappedGenericSequence">MappedGenericSequence</a><T, U>,<br> F: <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(T) -> U,</span></h4></section></summary><div class='docblock'>Maps a <code>GenericSequence</code> to another <code>GenericSequence</code>. <a href="functional/trait.FunctionalSequence.html#method.map">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.zip" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/lib.rs.html#495-504">source</a><a href="#method.zip" class="anchor">§</a><h4 class="code-header">fn <a href="functional/trait.FunctionalSequence.html#method.zip" class="fn">zip</a><B, Rhs, U, F>(self, rhs: Rhs, f: F) -> <a class="type" href="functional/type.MappedSequence.html" title="type generic_array::functional::MappedSequence">MappedSequence</a><Self, T, U><span class="where fmt-newline">where<br> Self: <a class="trait" href="functional/trait.MappedGenericSequence.html" title="trait generic_array::functional::MappedGenericSequence">MappedGenericSequence</a><T, U>,<br> Rhs: <a class="trait" href="functional/trait.MappedGenericSequence.html" title="trait generic_array::functional::MappedGenericSequence">MappedGenericSequence</a><B, U, Mapped = <a class="type" href="functional/type.MappedSequence.html" title="type generic_array::functional::MappedSequence">MappedSequence</a><Self, T, U>> + <a class="trait" href="sequence/trait.GenericSequence.html" title="trait generic_array::sequence::GenericSequence">GenericSequence</a><B, Length = Self::<a class="associatedtype" href="sequence/trait.GenericSequence.html#associatedtype.Length" title="type generic_array::sequence::GenericSequence::Length">Length</a>>,<br> Self::<a class="associatedtype" href="sequence/trait.GenericSequence.html#associatedtype.Length" title="type generic_array::sequence::GenericSequence::Length">Length</a>: <a class="trait" href="trait.ArrayLength.html" title="trait generic_array::ArrayLength">ArrayLength</a><B> + <a class="trait" href="trait.ArrayLength.html" title="trait generic_array::ArrayLength">ArrayLength</a><U>,<br> F: <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(T, Rhs::<a class="associatedtype" href="https://doc.rust-lang.org/1.67.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item" title="type core::iter::traits::collect::IntoIterator::Item">Item</a>) -> U,</span></h4></section></summary><div class='docblock'>Combines two <code>GenericSequence</code> instances and iterates through both of them,
|
||
initializing a new <code>GenericSequence</code> with the result of the zipped mapping function. <a href="functional/trait.FunctionalSequence.html#method.zip">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.fold" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/lib.rs.html#506-523">source</a><a href="#method.fold" class="anchor">§</a><h4 class="code-header">fn <a href="functional/trait.FunctionalSequence.html#method.fold" class="fn">fold</a><U, F>(self, init: U, f: F) -> U<span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(U, T) -> U,</span></h4></section></summary><div class='docblock'>Folds (or reduces) a sequence of data into a single value. <a href="functional/trait.FunctionalSequence.html#method.fold">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-GenericSequence%3CT%3E-for-GenericArray%3CT%2C%20N%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/lib.rs.html#371-458">source</a><a href="#impl-GenericSequence%3CT%3E-for-GenericArray%3CT%2C%20N%3E" class="anchor">§</a><h3 class="code-header">impl<T, N> <a class="trait" href="sequence/trait.GenericSequence.html" title="trait generic_array::sequence::GenericSequence">GenericSequence</a><T> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, N><span class="where fmt-newline">where<br> N: <a class="trait" href="trait.ArrayLength.html" title="trait generic_array::ArrayLength">ArrayLength</a><T>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a><Item = T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Length" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Length" class="anchor">§</a><h4 class="code-header">type <a href="sequence/trait.GenericSequence.html#associatedtype.Length" class="associatedtype">Length</a> = N</h4></section></summary><div class='docblock'><code>GenericArray</code> associated length</div></details><details class="rustdoc-toggle" open><summary><section id="associatedtype.Sequence" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Sequence" class="anchor">§</a><h4 class="code-header">type <a href="sequence/trait.GenericSequence.html#associatedtype.Sequence" class="associatedtype">Sequence</a> = <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, N></h4></section></summary><div class='docblock'>Concrete sequence type used in conjuction with reference implementations of <code>GenericSequence</code></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.generate" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/lib.rs.html#379-398">source</a><a href="#method.generate" class="anchor">§</a><h4 class="code-header">fn <a href="sequence/trait.GenericSequence.html#tymethod.generate" class="fn">generate</a><F>(f: F) -> <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, N><span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.usize.html">usize</a>) -> T,</span></h4></section></summary><div class='docblock'>Initializes a new sequence instance using the given function. <a href="sequence/trait.GenericSequence.html#tymethod.generate">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Hash-for-GenericArray%3CT%2C%20N%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#114-124">source</a><a href="#impl-Hash-for-GenericArray%3CT%2C%20N%3E" class="anchor">§</a><h3 class="code-header">impl<T: <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/hash/trait.Hash.html" title="trait core::hash::Hash">Hash</a>, N> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/hash/trait.Hash.html" title="trait core::hash::Hash">Hash</a> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, N><span class="where fmt-newline">where<br> N: <a class="trait" href="trait.ArrayLength.html" title="trait generic_array::ArrayLength">ArrayLength</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.hash" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#118-123">source</a><a href="#method.hash" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/hash/trait.Hash.html#tymethod.hash" class="fn">hash</a><H>(&self, state: <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.reference.html">&mut </a>H)<span class="where fmt-newline">where<br> H: <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/hash/trait.Hasher.html" title="trait core::hash::Hasher">Hasher</a>,</span></h4></section></summary><div class='docblock'>Feeds this value into the given <a href="https://doc.rust-lang.org/1.67.0/core/hash/trait.Hasher.html" title="Hasher"><code>Hasher</code></a>. <a href="https://doc.rust-lang.org/1.67.0/core/hash/trait.Hash.html#tymethod.hash">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.hash_slice" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.3.0">1.3.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.67.0/src/core/hash/mod.rs.html#239-241">source</a></span><a href="#method.hash_slice" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/hash/trait.Hash.html#method.hash_slice" class="fn">hash_slice</a><H>(data: &<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.slice.html">[Self]</a>, state: <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.reference.html">&mut </a>H)<span class="where fmt-newline">where<br> H: <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/hash/trait.Hasher.html" title="trait core::hash::Hasher">Hasher</a>,<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Feeds a slice of this type into the given <a href="https://doc.rust-lang.org/1.67.0/core/hash/trait.Hasher.html" title="Hasher"><code>Hasher</code></a>. <a href="https://doc.rust-lang.org/1.67.0/core/hash/trait.Hash.html#method.hash_slice">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-IntoIterator-for-%26%27a%20GenericArray%3CT%2C%20N%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/lib.rs.html#306-316">source</a><a href="#impl-IntoIterator-for-%26%27a%20GenericArray%3CT%2C%20N%3E" class="anchor">§</a><h3 class="code-header">impl<'a, T: 'a, N> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a> for &'a <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, N><span class="where fmt-newline">where<br> N: <a class="trait" href="trait.ArrayLength.html" title="trait generic_array::ArrayLength">ArrayLength</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.IntoIter-1" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.IntoIter-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.67.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter" class="associatedtype">IntoIter</a> = <a class="struct" href="https://doc.rust-lang.org/1.67.0/core/slice/iter/struct.Iter.html" title="struct core::slice::iter::Iter">Iter</a><'a, T></h4></section></summary><div class='docblock'>Which kind of iterator are we turning this into?</div></details><details class="rustdoc-toggle" open><summary><section id="associatedtype.Item-1" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.67.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item" class="associatedtype">Item</a> = <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.reference.html">&'a </a>T</h4></section></summary><div class='docblock'>The type of the elements being iterated over.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.into_iter-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/lib.rs.html#313-315">source</a><a href="#method.into_iter-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/iter/traits/collect/trait.IntoIterator.html#tymethod.into_iter" class="fn">into_iter</a>(self: &'a <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, N>) -> Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.67.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter" title="type core::iter::traits::collect::IntoIterator::IntoIter">IntoIter</a></h4></section></summary><div class='docblock'>Creates an iterator from a value. <a href="https://doc.rust-lang.org/1.67.0/core/iter/traits/collect/trait.IntoIterator.html#tymethod.into_iter">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-IntoIterator-for-%26%27a%20mut%20GenericArray%3CT%2C%20N%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/lib.rs.html#318-328">source</a><a href="#impl-IntoIterator-for-%26%27a%20mut%20GenericArray%3CT%2C%20N%3E" class="anchor">§</a><h3 class="code-header">impl<'a, T: 'a, N> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a> for &'a mut <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, N><span class="where fmt-newline">where<br> N: <a class="trait" href="trait.ArrayLength.html" title="trait generic_array::ArrayLength">ArrayLength</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.IntoIter-2" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.IntoIter-2" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.67.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter" class="associatedtype">IntoIter</a> = <a class="struct" href="https://doc.rust-lang.org/1.67.0/core/slice/iter/struct.IterMut.html" title="struct core::slice::iter::IterMut">IterMut</a><'a, T></h4></section></summary><div class='docblock'>Which kind of iterator are we turning this into?</div></details><details class="rustdoc-toggle" open><summary><section id="associatedtype.Item-2" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item-2" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.67.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item" class="associatedtype">Item</a> = <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.reference.html">&'a mut </a>T</h4></section></summary><div class='docblock'>The type of the elements being iterated over.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.into_iter-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/lib.rs.html#325-327">source</a><a href="#method.into_iter-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/iter/traits/collect/trait.IntoIterator.html#tymethod.into_iter" class="fn">into_iter</a>(self: &'a mut <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, N>) -> Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.67.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter" title="type core::iter::traits::collect::IntoIterator::IntoIter">IntoIter</a></h4></section></summary><div class='docblock'>Creates an iterator from a value. <a href="https://doc.rust-lang.org/1.67.0/core/iter/traits/collect/trait.IntoIterator.html#tymethod.into_iter">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-IntoIterator-for-GenericArray%3CT%2C%20N%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/iter.rs.html#47-61">source</a><a href="#impl-IntoIterator-for-GenericArray%3CT%2C%20N%3E" class="anchor">§</a><h3 class="code-header">impl<T, N> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, N><span class="where fmt-newline">where<br> N: <a class="trait" href="trait.ArrayLength.html" title="trait generic_array::ArrayLength">ArrayLength</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Item" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Item" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.67.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item" class="associatedtype">Item</a> = T</h4></section></summary><div class='docblock'>The type of the elements being iterated over.</div></details><details class="rustdoc-toggle" open><summary><section id="associatedtype.IntoIter" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.IntoIter" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.67.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter" class="associatedtype">IntoIter</a> = <a class="struct" href="iter/struct.GenericArrayIter.html" title="struct generic_array::iter::GenericArrayIter">GenericArrayIter</a><T, N></h4></section></summary><div class='docblock'>Which kind of iterator are we turning this into?</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.into_iter" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/iter.rs.html#54-60">source</a><a href="#method.into_iter" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/iter/traits/collect/trait.IntoIterator.html#tymethod.into_iter" class="fn">into_iter</a>(self) -> Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.67.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.IntoIter" title="type core::iter::traits::collect::IntoIterator::IntoIter">IntoIter</a></h4></section></summary><div class='docblock'>Creates an iterator from a value. <a href="https://doc.rust-lang.org/1.67.0/core/iter/traits/collect/trait.IntoIterator.html#tymethod.into_iter">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Lengthen%3CT%3E-for-GenericArray%3CT%2C%20N%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/sequence.rs.html#190-230">source</a><a href="#impl-Lengthen%3CT%3E-for-GenericArray%3CT%2C%20N%3E" class="anchor">§</a><h3 class="code-header">impl<T, N> <a class="trait" href="sequence/trait.Lengthen.html" title="trait generic_array::sequence::Lengthen">Lengthen</a><T> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, N><span class="where fmt-newline">where<br> N: <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/ops/arith/trait.Add.html" title="trait core::ops::arith::Add">Add</a><<a class="struct" href="../typenum/bit/struct.B1.html" title="struct typenum::bit::B1">B1</a>> + <a class="trait" href="trait.ArrayLength.html" title="trait generic_array::ArrayLength">ArrayLength</a><T>,<br> <a class="type" href="../typenum/operator_aliases/type.Add1.html" title="type typenum::operator_aliases::Add1">Add1</a><N>: <a class="trait" href="trait.ArrayLength.html" title="trait generic_array::ArrayLength">ArrayLength</a><T> + <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/ops/arith/trait.Sub.html" title="trait core::ops::arith::Sub">Sub</a><<a class="struct" href="../typenum/bit/struct.B1.html" title="struct typenum::bit::B1">B1</a>, Output = N>,<br> <a class="type" href="../typenum/operator_aliases/type.Sub1.html" title="type typenum::operator_aliases::Sub1">Sub1</a><<a class="type" href="../typenum/operator_aliases/type.Add1.html" title="type typenum::operator_aliases::Add1">Add1</a><N>>: <a class="trait" href="trait.ArrayLength.html" title="trait generic_array::ArrayLength">ArrayLength</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Longer" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Longer" class="anchor">§</a><h4 class="code-header">type <a href="sequence/trait.Lengthen.html#associatedtype.Longer" class="associatedtype">Longer</a> = <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <N as <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/ops/arith/trait.Add.html" title="trait core::ops::arith::Add">Add</a><<a class="struct" href="../typenum/bit/struct.B1.html" title="struct typenum::bit::B1">B1</a>>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.67.0/core/ops/arith/trait.Add.html#associatedtype.Output" title="type core::ops::arith::Add::Output">Output</a>></h4></section></summary><div class='docblock'><code>GenericSequence</code> that has one more element than <code>Self</code></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.append" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/sequence.rs.html#199-213">source</a><a href="#method.append" class="anchor">§</a><h4 class="code-header">fn <a href="sequence/trait.Lengthen.html#tymethod.append" class="fn">append</a>(self, last: T) -> Self::<a class="associatedtype" href="sequence/trait.Lengthen.html#associatedtype.Longer" title="type generic_array::sequence::Lengthen::Longer">Longer</a></h4></section></summary><div class='docblock'>Returns a new array with the given element appended to the end of it. <a href="sequence/trait.Lengthen.html#tymethod.append">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.prepend" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/sequence.rs.html#215-229">source</a><a href="#method.prepend" class="anchor">§</a><h4 class="code-header">fn <a href="sequence/trait.Lengthen.html#tymethod.prepend" class="fn">prepend</a>(self, first: T) -> Self::<a class="associatedtype" href="sequence/trait.Lengthen.html#associatedtype.Longer" title="type generic_array::sequence::Lengthen::Longer">Longer</a></h4></section></summary><div class='docblock'>Returns a new array with the given element prepended to the front of it. <a href="sequence/trait.Lengthen.html#tymethod.prepend">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-LowerHex-for-GenericArray%3Cu8%2C%20T%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/hex.rs.html#27-65">source</a><a href="#impl-LowerHex-for-GenericArray%3Cu8%2C%20T%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/fmt/trait.LowerHex.html" title="trait core::fmt::LowerHex">LowerHex</a> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.u8.html">u8</a>, T><span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/ops/arith/trait.Add.html" title="trait core::ops::arith::Add">Add</a><T> + <a class="trait" href="trait.ArrayLength.html" title="trait generic_array::ArrayLength">ArrayLength</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.u8.html">u8</a>>,<br> <T as <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/ops/arith/trait.Add.html" title="trait core::ops::arith::Add">Add</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.67.0/core/ops/arith/trait.Add.html#associatedtype.Output" title="type core::ops::arith::Add::Output">Output</a>: <a class="trait" href="trait.ArrayLength.html" title="trait generic_array::ArrayLength">ArrayLength</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.u8.html">u8</a>>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/hex.rs.html#32-64">source</a><a href="#method.fmt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/fmt/trait.LowerHex.html#tymethod.fmt" class="fn">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.67.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.67.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-MappedGenericSequence%3CT%2C%20U%3E-for-GenericArray%3CT%2C%20N%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/lib.rs.html#460-466">source</a><a href="#impl-MappedGenericSequence%3CT%2C%20U%3E-for-GenericArray%3CT%2C%20N%3E" class="anchor">§</a><h3 class="code-header">impl<T, U, N> <a class="trait" href="functional/trait.MappedGenericSequence.html" title="trait generic_array::functional::MappedGenericSequence">MappedGenericSequence</a><T, U> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, N><span class="where fmt-newline">where<br> N: <a class="trait" href="trait.ArrayLength.html" title="trait generic_array::ArrayLength">ArrayLength</a><T> + <a class="trait" href="trait.ArrayLength.html" title="trait generic_array::ArrayLength">ArrayLength</a><U>,<br> <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><U, N>: <a class="trait" href="sequence/trait.GenericSequence.html" title="trait generic_array::sequence::GenericSequence">GenericSequence</a><U, Length = N>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Mapped" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Mapped" class="anchor">§</a><h4 class="code-header">type <a href="functional/trait.MappedGenericSequence.html#associatedtype.Mapped" class="associatedtype">Mapped</a> = <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><U, N></h4></section></summary><div class='docblock'>Mapped sequence type</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Ord-for-GenericArray%3CT%2C%20N%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#56-63">source</a><a href="#impl-Ord-for-GenericArray%3CT%2C%20N%3E" class="anchor">§</a><h3 class="code-header">impl<T: <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a>, N> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, N><span class="where fmt-newline">where<br> N: <a class="trait" href="trait.ArrayLength.html" title="trait generic_array::ArrayLength">ArrayLength</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.cmp" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#60-62">source</a><a href="#method.cmp" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/cmp/trait.Ord.html#tymethod.cmp" class="fn">cmp</a>(&self, other: &<a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, N>) -> <a class="enum" href="https://doc.rust-lang.org/1.67.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a></h4></section></summary><div class='docblock'>This method returns an <a href="https://doc.rust-lang.org/1.67.0/core/cmp/enum.Ordering.html" title="Ordering"><code>Ordering</code></a> between <code>self</code> and <code>other</code>. <a href="https://doc.rust-lang.org/1.67.0/core/cmp/trait.Ord.html#tymethod.cmp">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.max" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.21.0">1.21.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.67.0/src/core/cmp.rs.html#798-801">source</a></span><a href="#method.max" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/cmp/trait.Ord.html#method.max" class="fn">max</a>(self, other: Self) -> Self<span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Compares and returns the maximum of two values. <a href="https://doc.rust-lang.org/1.67.0/core/cmp/trait.Ord.html#method.max">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.min" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.21.0">1.21.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.67.0/src/core/cmp.rs.html#825-828">source</a></span><a href="#method.min" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/cmp/trait.Ord.html#method.min" class="fn">min</a>(self, other: Self) -> Self<span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h4></section></summary><div class='docblock'>Compares and returns the minimum of two values. <a href="https://doc.rust-lang.org/1.67.0/core/cmp/trait.Ord.html#method.min">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.clamp" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.50.0">1.50.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.67.0/src/core/cmp.rs.html#857-861">source</a></span><a href="#method.clamp" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/cmp/trait.Ord.html#method.clamp" class="fn">clamp</a>(self, min: Self, max: Self) -> Self<span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a><Self>,</span></h4></section></summary><div class='docblock'>Restrict a value to a certain interval. <a href="https://doc.rust-lang.org/1.67.0/core/cmp/trait.Ord.html#method.clamp">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-PartialEq%3CGenericArray%3CT%2C%20N%3E%3E-for-GenericArray%3CT%2C%20N%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#37-44">source</a><a href="#impl-PartialEq%3CGenericArray%3CT%2C%20N%3E%3E-for-GenericArray%3CT%2C%20N%3E" class="anchor">§</a><h3 class="code-header">impl<T: <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>, N> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><<a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, N>> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, N><span class="where fmt-newline">where<br> N: <a class="trait" href="trait.ArrayLength.html" title="trait generic_array::ArrayLength">ArrayLength</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.eq" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#41-43">source</a><a href="#method.eq" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/cmp/trait.PartialEq.html#tymethod.eq" class="fn">eq</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.reference.html">&</a>Self) -> <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used
|
||
by <code>==</code>. <a href="https://doc.rust-lang.org/1.67.0/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.ne" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.67.0/src/core/cmp.rs.html#229">source</a></span><a href="#method.ne" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/cmp/trait.PartialEq.html#method.ne" class="fn">ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.reference.html">&</a>Rhs) -> <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always
|
||
sufficient, and should not be overridden without very good reason. <a href="https://doc.rust-lang.org/1.67.0/core/cmp/trait.PartialEq.html#method.ne">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-PartialOrd%3CGenericArray%3CT%2C%20N%3E%3E-for-GenericArray%3CT%2C%20N%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#47-54">source</a><a href="#impl-PartialOrd%3CGenericArray%3CT%2C%20N%3E%3E-for-GenericArray%3CT%2C%20N%3E" class="anchor">§</a><h3 class="code-header">impl<T: <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a>, N> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a><<a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, N>> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, N><span class="where fmt-newline">where<br> N: <a class="trait" href="trait.ArrayLength.html" title="trait generic_array::ArrayLength">ArrayLength</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.partial_cmp" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#51-53">source</a><a href="#method.partial_cmp" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp" class="fn">partial_cmp</a>(&self, other: &<a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, N>) -> <a class="enum" href="https://doc.rust-lang.org/1.67.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="https://doc.rust-lang.org/1.67.0/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>></h4></section></summary><div class='docblock'>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="https://doc.rust-lang.org/1.67.0/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.lt" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.67.0/src/core/cmp.rs.html#1126">source</a></span><a href="#method.lt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/cmp/trait.PartialOrd.html#method.lt" class="fn">lt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.reference.html">&</a>Rhs) -> <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code><</code> operator. <a href="https://doc.rust-lang.org/1.67.0/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.le" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.67.0/src/core/cmp.rs.html#1145">source</a></span><a href="#method.le" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/cmp/trait.PartialOrd.html#method.le" class="fn">le</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.reference.html">&</a>Rhs) -> <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code><=</code>
|
||
operator. <a href="https://doc.rust-lang.org/1.67.0/core/cmp/trait.PartialOrd.html#method.le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.gt" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.67.0/src/core/cmp.rs.html#1163">source</a></span><a href="#method.gt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/cmp/trait.PartialOrd.html#method.gt" class="fn">gt</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.reference.html">&</a>Rhs) -> <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>></code> operator. <a href="https://doc.rust-lang.org/1.67.0/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.ge" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.67.0/src/core/cmp.rs.html#1182">source</a></span><a href="#method.ge" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/cmp/trait.PartialOrd.html#method.ge" class="fn">ge</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.reference.html">&</a>Rhs) -> <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>>=</code>
|
||
operator. <a href="https://doc.rust-lang.org/1.67.0/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Shorten%3CT%3E-for-GenericArray%3CT%2C%20N%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/sequence.rs.html#232-263">source</a><a href="#impl-Shorten%3CT%3E-for-GenericArray%3CT%2C%20N%3E" class="anchor">§</a><h3 class="code-header">impl<T, N> <a class="trait" href="sequence/trait.Shorten.html" title="trait generic_array::sequence::Shorten">Shorten</a><T> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, N><span class="where fmt-newline">where<br> N: <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/ops/arith/trait.Sub.html" title="trait core::ops::arith::Sub">Sub</a><<a class="struct" href="../typenum/bit/struct.B1.html" title="struct typenum::bit::B1">B1</a>> + <a class="trait" href="trait.ArrayLength.html" title="trait generic_array::ArrayLength">ArrayLength</a><T>,<br> <a class="type" href="../typenum/operator_aliases/type.Sub1.html" title="type typenum::operator_aliases::Sub1">Sub1</a><N>: <a class="trait" href="trait.ArrayLength.html" title="trait generic_array::ArrayLength">ArrayLength</a><T> + <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/ops/arith/trait.Add.html" title="trait core::ops::arith::Add">Add</a><<a class="struct" href="../typenum/bit/struct.B1.html" title="struct typenum::bit::B1">B1</a>, Output = N>,<br> <a class="type" href="../typenum/operator_aliases/type.Add1.html" title="type typenum::operator_aliases::Add1">Add1</a><<a class="type" href="../typenum/operator_aliases/type.Sub1.html" title="type typenum::operator_aliases::Sub1">Sub1</a><N>>: <a class="trait" href="trait.ArrayLength.html" title="trait generic_array::ArrayLength">ArrayLength</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Shorter" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Shorter" class="anchor">§</a><h4 class="code-header">type <a href="sequence/trait.Shorten.html#associatedtype.Shorter" class="associatedtype">Shorter</a> = <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <N as <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/ops/arith/trait.Sub.html" title="trait core::ops::arith::Sub">Sub</a><<a class="struct" href="../typenum/bit/struct.B1.html" title="struct typenum::bit::B1">B1</a>>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.67.0/core/ops/arith/trait.Sub.html#associatedtype.Output" title="type core::ops::arith::Sub::Output">Output</a>></h4></section></summary><div class='docblock'><code>GenericSequence</code> that has one less element than <code>Self</code></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.pop_back" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/sequence.rs.html#241-250">source</a><a href="#method.pop_back" class="anchor">§</a><h4 class="code-header">fn <a href="sequence/trait.Shorten.html#tymethod.pop_back" class="fn">pop_back</a>(self) -> (Self::<a class="associatedtype" href="sequence/trait.Shorten.html#associatedtype.Shorter" title="type generic_array::sequence::Shorten::Shorter">Shorter</a>, T)</h4></section></summary><div class='docblock'>Returns a new array without the last element, and the last element. <a href="sequence/trait.Shorten.html#tymethod.pop_back">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.pop_front" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/sequence.rs.html#252-262">source</a><a href="#method.pop_front" class="anchor">§</a><h4 class="code-header">fn <a href="sequence/trait.Shorten.html#tymethod.pop_front" class="fn">pop_front</a>(self) -> (T, Self::<a class="associatedtype" href="sequence/trait.Shorten.html#associatedtype.Shorter" title="type generic_array::sequence::Shorten::Shorter">Shorter</a>)</h4></section></summary><div class='docblock'>Returns a new array without the first element, and the first element.
|
||
Example: <a href="sequence/trait.Shorten.html#tymethod.pop_front">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Split%3CT%2C%20K%3E-for-%26%27a%20GenericArray%3CT%2C%20N%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/sequence.rs.html#302-320">source</a><a href="#impl-Split%3CT%2C%20K%3E-for-%26%27a%20GenericArray%3CT%2C%20N%3E" class="anchor">§</a><h3 class="code-header">impl<'a, T, N, K> <a class="trait" href="sequence/trait.Split.html" title="trait generic_array::sequence::Split">Split</a><T, K> for &'a <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, N><span class="where fmt-newline">where<br> N: <a class="trait" href="trait.ArrayLength.html" title="trait generic_array::ArrayLength">ArrayLength</a><T> + <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/ops/arith/trait.Sub.html" title="trait core::ops::arith::Sub">Sub</a><K>,<br> K: <a class="trait" href="trait.ArrayLength.html" title="trait generic_array::ArrayLength">ArrayLength</a><T> + 'static,<br> <a class="type" href="../typenum/operator_aliases/type.Diff.html" title="type typenum::operator_aliases::Diff">Diff</a><N, K>: <a class="trait" href="trait.ArrayLength.html" title="trait generic_array::ArrayLength">ArrayLength</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.First-1" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.First-1" class="anchor">§</a><h4 class="code-header">type <a href="sequence/trait.Split.html#associatedtype.First" class="associatedtype">First</a> = &'a <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, K></h4></section></summary><div class='docblock'>First part of the resulting split array</div></details><details class="rustdoc-toggle" open><summary><section id="associatedtype.Second-1" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Second-1" class="anchor">§</a><h4 class="code-header">type <a href="sequence/trait.Split.html#associatedtype.Second" class="associatedtype">Second</a> = &'a <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <N as <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/ops/arith/trait.Sub.html" title="trait core::ops::arith::Sub">Sub</a><K>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.67.0/core/ops/arith/trait.Sub.html#associatedtype.Output" title="type core::ops::arith::Sub::Output">Output</a>></h4></section></summary><div class='docblock'>Second part of the resulting split array</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.split-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/sequence.rs.html#312-319">source</a><a href="#method.split-2" class="anchor">§</a><h4 class="code-header">fn <a href="sequence/trait.Split.html#tymethod.split" class="fn">split</a>(self) -> (Self::<a class="associatedtype" href="sequence/trait.Split.html#associatedtype.First" title="type generic_array::sequence::Split::First">First</a>, Self::<a class="associatedtype" href="sequence/trait.Split.html#associatedtype.Second" title="type generic_array::sequence::Split::Second">Second</a>)</h4></section></summary><div class='docblock'>Splits an array at the given index, returning the separate parts of the array.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Split%3CT%2C%20K%3E-for-%26%27a%20mut%20GenericArray%3CT%2C%20N%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/sequence.rs.html#322-340">source</a><a href="#impl-Split%3CT%2C%20K%3E-for-%26%27a%20mut%20GenericArray%3CT%2C%20N%3E" class="anchor">§</a><h3 class="code-header">impl<'a, T, N, K> <a class="trait" href="sequence/trait.Split.html" title="trait generic_array::sequence::Split">Split</a><T, K> for &'a mut <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, N><span class="where fmt-newline">where<br> N: <a class="trait" href="trait.ArrayLength.html" title="trait generic_array::ArrayLength">ArrayLength</a><T> + <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/ops/arith/trait.Sub.html" title="trait core::ops::arith::Sub">Sub</a><K>,<br> K: <a class="trait" href="trait.ArrayLength.html" title="trait generic_array::ArrayLength">ArrayLength</a><T> + 'static,<br> <a class="type" href="../typenum/operator_aliases/type.Diff.html" title="type typenum::operator_aliases::Diff">Diff</a><N, K>: <a class="trait" href="trait.ArrayLength.html" title="trait generic_array::ArrayLength">ArrayLength</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.First-2" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.First-2" class="anchor">§</a><h4 class="code-header">type <a href="sequence/trait.Split.html#associatedtype.First" class="associatedtype">First</a> = &'a mut <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, K></h4></section></summary><div class='docblock'>First part of the resulting split array</div></details><details class="rustdoc-toggle" open><summary><section id="associatedtype.Second-2" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Second-2" class="anchor">§</a><h4 class="code-header">type <a href="sequence/trait.Split.html#associatedtype.Second" class="associatedtype">Second</a> = &'a mut <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <N as <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/ops/arith/trait.Sub.html" title="trait core::ops::arith::Sub">Sub</a><K>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.67.0/core/ops/arith/trait.Sub.html#associatedtype.Output" title="type core::ops::arith::Sub::Output">Output</a>></h4></section></summary><div class='docblock'>Second part of the resulting split array</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.split-3" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/sequence.rs.html#332-339">source</a><a href="#method.split-3" class="anchor">§</a><h4 class="code-header">fn <a href="sequence/trait.Split.html#tymethod.split" class="fn">split</a>(self) -> (Self::<a class="associatedtype" href="sequence/trait.Split.html#associatedtype.First" title="type generic_array::sequence::Split::First">First</a>, Self::<a class="associatedtype" href="sequence/trait.Split.html#associatedtype.Second" title="type generic_array::sequence::Split::Second">Second</a>)</h4></section></summary><div class='docblock'>Splits an array at the given index, returning the separate parts of the array.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Split%3CT%2C%20K%3E-for-GenericArray%3CT%2C%20N%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/sequence.rs.html#279-300">source</a><a href="#impl-Split%3CT%2C%20K%3E-for-GenericArray%3CT%2C%20N%3E" class="anchor">§</a><h3 class="code-header">impl<T, N, K> <a class="trait" href="sequence/trait.Split.html" title="trait generic_array::sequence::Split">Split</a><T, K> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, N><span class="where fmt-newline">where<br> N: <a class="trait" href="trait.ArrayLength.html" title="trait generic_array::ArrayLength">ArrayLength</a><T> + <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/ops/arith/trait.Sub.html" title="trait core::ops::arith::Sub">Sub</a><K>,<br> K: <a class="trait" href="trait.ArrayLength.html" title="trait generic_array::ArrayLength">ArrayLength</a><T>,<br> <a class="type" href="../typenum/operator_aliases/type.Diff.html" title="type typenum::operator_aliases::Diff">Diff</a><N, K>: <a class="trait" href="trait.ArrayLength.html" title="trait generic_array::ArrayLength">ArrayLength</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.First" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.First" class="anchor">§</a><h4 class="code-header">type <a href="sequence/trait.Split.html#associatedtype.First" class="associatedtype">First</a> = <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, K></h4></section></summary><div class='docblock'>First part of the resulting split array</div></details><details class="rustdoc-toggle" open><summary><section id="associatedtype.Second" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Second" class="anchor">§</a><h4 class="code-header">type <a href="sequence/trait.Split.html#associatedtype.Second" class="associatedtype">Second</a> = <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, <N as <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/ops/arith/trait.Sub.html" title="trait core::ops::arith::Sub">Sub</a><K>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.67.0/core/ops/arith/trait.Sub.html#associatedtype.Output" title="type core::ops::arith::Sub::Output">Output</a>></h4></section></summary><div class='docblock'>Second part of the resulting split array</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.split-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/sequence.rs.html#289-299">source</a><a href="#method.split-1" class="anchor">§</a><h4 class="code-header">fn <a href="sequence/trait.Split.html#tymethod.split" class="fn">split</a>(self) -> (Self::<a class="associatedtype" href="sequence/trait.Split.html#associatedtype.First" title="type generic_array::sequence::Split::First">First</a>, Self::<a class="associatedtype" href="sequence/trait.Split.html#associatedtype.Second" title="type generic_array::sequence::Split::Second">Second</a>)</h4></section></summary><div class='docblock'>Splits an array at the given index, returning the separate parts of the array.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-UpperHex-for-GenericArray%3Cu8%2C%20T%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/hex.rs.html#67-105">source</a><a href="#impl-UpperHex-for-GenericArray%3Cu8%2C%20T%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/fmt/trait.UpperHex.html" title="trait core::fmt::UpperHex">UpperHex</a> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.u8.html">u8</a>, T><span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/ops/arith/trait.Add.html" title="trait core::ops::arith::Add">Add</a><T> + <a class="trait" href="trait.ArrayLength.html" title="trait generic_array::ArrayLength">ArrayLength</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.u8.html">u8</a>>,<br> <T as <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/ops/arith/trait.Add.html" title="trait core::ops::arith::Add">Add</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.67.0/core/ops/arith/trait.Add.html#associatedtype.Output" title="type core::ops::arith::Add::Output">Output</a>: <a class="trait" href="trait.ArrayLength.html" title="trait generic_array::ArrayLength">ArrayLength</a><<a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.u8.html">u8</a>>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.fmt-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/generic_array/hex.rs.html#72-104">source</a><a href="#method.fmt-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/fmt/trait.UpperHex.html#tymethod.fmt" class="fn">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.67.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.67.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter.</div></details></div></details><section id="impl-Copy-for-GenericArray%3CT%2C%20N%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#30-35">source</a><a href="#impl-Copy-for-GenericArray%3CT%2C%20N%3E" class="anchor">§</a><h3 class="code-header">impl<T: <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a>, N> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, N><span class="where fmt-newline">where<br> N: <a class="trait" href="trait.ArrayLength.html" title="trait generic_array::ArrayLength">ArrayLength</a><T>,<br> N::<a class="associatedtype" href="trait.ArrayLength.html#associatedtype.ArrayType" title="type generic_array::ArrayLength::ArrayType">ArrayType</a>: <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a>,</span></h3></section><section id="impl-Eq-for-GenericArray%3CT%2C%20N%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/impls.rs.html#45">source</a><a href="#impl-Eq-for-GenericArray%3CT%2C%20N%3E" class="anchor">§</a><h3 class="code-header">impl<T: <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a>, N> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, N><span class="where fmt-newline">where<br> N: <a class="trait" href="trait.ArrayLength.html" title="trait generic_array::ArrayLength">ArrayLength</a><T>,</span></h3></section><section id="impl-Send-for-GenericArray%3CT%2C%20N%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/lib.rs.html#182">source</a><a href="#impl-Send-for-GenericArray%3CT%2C%20N%3E" class="anchor">§</a><h3 class="code-header">impl<T: <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>, N: <a class="trait" href="trait.ArrayLength.html" title="trait generic_array::ArrayLength">ArrayLength</a><T>> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, N></h3></section><section id="impl-Sync-for-GenericArray%3CT%2C%20N%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/generic_array/lib.rs.html#183">source</a><a href="#impl-Sync-for-GenericArray%3CT%2C%20N%3E" class="anchor">§</a><h3 class="code-header">impl<T: <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a>, N: <a class="trait" href="trait.ArrayLength.html" title="trait generic_array::ArrayLength">ArrayLength</a><T>> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, N></h3></section></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor">§</a></h2><div id="synthetic-implementations-list"><section id="impl-RefUnwindSafe-for-GenericArray%3CT%2C%20U%3E" class="impl has-srclink"><a href="#impl-RefUnwindSafe-for-GenericArray%3CT%2C%20U%3E" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, U><span class="where fmt-newline">where<br> <U as <a class="trait" href="trait.ArrayLength.html" title="trait generic_array::ArrayLength">ArrayLength</a><T>>::<a class="associatedtype" href="trait.ArrayLength.html#associatedtype.ArrayType" title="type generic_array::ArrayLength::ArrayType">ArrayType</a>: <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a>,</span></h3></section><section id="impl-Unpin-for-GenericArray%3CT%2C%20U%3E" class="impl has-srclink"><a href="#impl-Unpin-for-GenericArray%3CT%2C%20U%3E" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, U><span class="where fmt-newline">where<br> <U as <a class="trait" href="trait.ArrayLength.html" title="trait generic_array::ArrayLength">ArrayLength</a><T>>::<a class="associatedtype" href="trait.ArrayLength.html#associatedtype.ArrayType" title="type generic_array::ArrayLength::ArrayType">ArrayType</a>: <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</span></h3></section><section id="impl-UnwindSafe-for-GenericArray%3CT%2C%20U%3E" class="impl has-srclink"><a href="#impl-UnwindSafe-for-GenericArray%3CT%2C%20U%3E" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.GenericArray.html" title="struct generic_array::GenericArray">GenericArray</a><T, U><span class="where fmt-newline">where<br> <U as <a class="trait" href="trait.ArrayLength.html" title="trait generic_array::ArrayLength">ArrayLength</a><T>>::<a class="associatedtype" href="trait.ArrayLength.html#associatedtype.ArrayType" title="type generic_array::ArrayLength::ArrayType">ArrayType</a>: <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a>,</span></h3></section></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor">§</a></h2><div id="blanket-implementations-list"><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Any-for-GenericArray%3CT%2C%20U%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.67.0/src/core/any.rs.html#200">source</a><a href="#impl-Any-for-GenericArray%3CT%2C%20U%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.67.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.67.0/src/core/any.rs.html#201">source</a><a href="#method.type_id" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/any/trait.Any.html#tymethod.type_id" class="fn">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.67.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.67.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-GenericArray%3CT%2C%20U%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.67.0/src/core/borrow.rs.html#211">source</a><a href="#impl-Borrow%3CT%3E-for-GenericArray%3CT%2C%20U%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T<span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/1.67.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.borrow-1" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/91522" title="Tracking issue for const_borrow">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.67.0/src/core/borrow.rs.html#213">source</a></span><a href="#method.borrow-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.reference.html">&</a>T</h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.67.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-GenericArray%3CT%2C%20U%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.67.0/src/core/borrow.rs.html#220">source</a><a href="#impl-BorrowMut%3CT%3E-for-GenericArray%3CT%2C%20U%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T<span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/1.67.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.borrow_mut-1" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/91522" title="Tracking issue for const_borrow">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.67.0/src/core/borrow.rs.html#221">source</a></span><a href="#method.borrow_mut-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fn">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.67.0/core/primitive.reference.html">&mut </a>T</h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.67.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-GenericArray%3CT%2C%20U%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.67.0/src/core/convert/mod.rs.html#733">source</a><a href="#impl-From%3CT%3E-for-GenericArray%3CT%2C%20U%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from-130" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.67.0/src/core/convert/mod.rs.html#736">source</a></span><a href="#method.from-130" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(t: T) -> T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p>
|
||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-GenericArray%3CT%2C%20U%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.67.0/src/core/convert/mod.rs.html#717">source</a><a href="#impl-Into%3CU%3E-for-GenericArray%3CT%2C%20U%3E" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T<span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.into" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.67.0/src/core/convert/mod.rs.html#725">source</a></span><a href="#method.into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.Into.html#tymethod.into" class="fn">into</a>(self) -> U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p>
|
||
<p>That is, this conversion is whatever the implementation of
|
||
<code><a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.From.html" title="From">From</a><T> for U</code> chooses to do.</p>
|
||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Same%3CT%3E-for-GenericArray%3CT%2C%20U%3E" class="impl has-srclink"><a class="srclink rightside" href="../src/typenum/type_operators.rs.html#34">source</a><a href="#impl-Same%3CT%3E-for-GenericArray%3CT%2C%20U%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="../typenum/type_operators/trait.Same.html" title="trait typenum::type_operators::Same">Same</a><T> for T</h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Output-1" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Output-1" class="anchor">§</a><h4 class="code-header">type <a href="../typenum/type_operators/trait.Same.html#associatedtype.Output" class="associatedtype">Output</a> = T</h4></section></summary><div class='docblock'>Should always be <code>Self</code></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-GenericArray%3CT%2C%20U%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.67.0/src/core/convert/mod.rs.html#775">source</a><a href="#impl-TryFrom%3CU%3E-for-GenericArray%3CT%2C%20U%3E" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T<span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Error" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.67.0/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.67.0/src/core/convert/mod.rs.html#781">source</a></span><a href="#method.try_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/1.67.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-GenericArray%3CT%2C%20U%3E" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/1.67.0/src/core/convert/mod.rs.html#760">source</a><a href="#impl-TryInto%3CU%3E-for-GenericArray%3CT%2C%20U%3E" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T<span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Error-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.67.0/src/core/convert/mod.rs.html#766">source</a></span><a href="#method.try_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.67.0/core/convert/trait.TryInto.html#tymethod.try_into" class="fn">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.67.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.67.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details></div></section></div></main><div id="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="generic_array" data-themes="" data-resource-suffix="" data-rustdoc-version="1.67.0 (fc594f156 2023-01-24)" data-search-js="search-444266647c4dba98.js" data-settings-js="settings-bebeae96e00e4617.js" data-settings-css="settings-af96d9e2fc13e081.css" ></div></body></html> |