+/livesplit-wrapper
git clone https://git.julia.blue/+/livesplit-wrapper
b0170e4
gh-pages
1<!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 ="Source of the Rust file `/home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/bytemuck-1.12.1/src/contiguous.rs`. ">< meta name ="keywords "content ="rust, rustlang, rust-lang ">< title > contiguous.rs - source</ title >< link rel ="preload "as ="font "type ="font/woff2 "crossorigin href ="../../SourceSerif4-Regular.ttf.woff2 ">< link rel ="preload "as ="font "type ="font/woff2 "crossorigin href ="../../FiraSans-Regular.woff2 ">< link rel ="preload "as ="font "type ="font/woff2 "crossorigin href ="../../FiraSans-Medium.woff2 ">< link rel ="preload "as ="font "type ="font/woff2 "crossorigin href ="../../SourceCodePro-Regular.ttf.woff2 ">< link rel ="preload "as ="font "type ="font/woff2 "crossorigin href ="../../SourceSerif4-Bold.ttf.woff2 ">< link rel ="preload "as ="font "type ="font/woff2 "crossorigin href ="../../SourceCodePro-Semibold.ttf.woff2 ">< link rel ="stylesheet "href ="../../normalize.css ">< link rel ="stylesheet "href ="../../rustdoc.css "id ="mainThemeStyle ">< link rel ="stylesheet "href ="../../ayu.css "disabled >< link rel ="stylesheet "href ="../../dark.css "disabled >< link rel ="stylesheet "href ="../../light.css "id ="themeStyle ">< script id ="default-settings "></ script >< script src ="../../storage.js "></ script >< script defer src ="../../source-script.js "></ script >< script defer src ="../../source-files.js "></ script >< script defer src ="../../main.js "></ script >< noscript >< link rel ="stylesheet "href ="../../noscript.css "></ noscript >< link rel ="alternate icon "type ="image/png "href ="../../favicon-16x16.png ">< link rel ="alternate icon "type ="image/png "href ="../../favicon-32x32.png ">< link rel ="icon "type ="image/svg+xml "href ="../../favicon.svg "></ head >< body class ="rustdoc source "> <!--[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 ="../../bytemuck/index.html ">< div class ="logo-container ">< img class ="rust-logo "src ="../../rust-logo.svg "alt ="logo "></ div ></ a >< h2 class ="location "></ h2 ></ nav >< nav class ="sidebar ">< a class ="sidebar-logo "href ="../../bytemuck/index.html ">< div class ="logo-container ">< img class ="rust-logo "src ="../../rust-logo.svg "alt ="logo "></ div ></ a ></ nav >< main >< div class ="width-limiter ">< div class ="sub-container ">< a class ="sub-logo-container "href ="../../bytemuck/index.html ">< img class ="rust-logo "src ="../../rust-logo.svg "alt ="logo "></ a >< nav class ="sub ">< form class ="search-form ">< div class ="search-container ">< span ></ span >< input class ="search-input "name ="search "autocomplete ="off "spellcheck ="false "placeholder ="Click or press ‘S’ to search, ‘?’ for more options… "type ="search ">< div id ="help-button "title ="help "tabindex ="-1 ">< button type ="button "> ?</ button ></ div >< div id ="settings-menu "tabindex ="-1 ">< a href ="../../settings.html "title ="settings ">< img width ="22 "height ="22 "alt ="Change settings "src ="../../wheel.svg "></ a ></ div ></ div ></ form ></ nav ></ div >< section id ="main-content "class ="content ">< div class ="example-wrap ">< pre class ="line-numbers ">< span id ="1 "> 1</ span > 2< span id ="2 "> 2</ span > 3< span id ="3 "> 3</ span > 4< span id ="4 "> 4</ span > 5< span id ="5 "> 5</ span > 6< span id ="6 "> 6</ span > 7< span id ="7 "> 7</ span > 8< span id ="8 "> 8</ span > 9< span id ="9 "> 9</ span > 10< span id ="10 "> 10</ span > 11< span id ="11 "> 11</ span > 12< span id ="12 "> 12</ span > 13< span id ="13 "> 13</ span > 14< span id ="14 "> 14</ span > 15< span id ="15 "> 15</ span > 16< span id ="16 "> 16</ span > 17< span id ="17 "> 17</ span > 18< span id ="18 "> 18</ span > 19< span id ="19 "> 19</ span > 20< span id ="20 "> 20</ span > 21< span id ="21 "> 21</ span > 22< span id ="22 "> 22</ span > 23< span id ="23 "> 23</ span > 24< span id ="24 "> 24</ span > 25< span id ="25 "> 25</ span > 26< span id ="26 "> 26</ span > 27< span id ="27 "> 27</ span > 28< span id ="28 "> 28</ span > 29< span id ="29 "> 29</ span > 30< span id ="30 "> 30</ span > 31< span id ="31 "> 31</ span > 32< span id ="32 "> 32</ span > 33< span id ="33 "> 33</ span > 34< span id ="34 "> 34</ span > 35< span id ="35 "> 35</ span > 36< span id ="36 "> 36</ span > 37< span id ="37 "> 37</ span > 38< span id ="38 "> 38</ span > 39< span id ="39 "> 39</ span > 40< span id ="40 "> 40</ span > 41< span id ="41 "> 41</ span > 42< span id ="42 "> 42</ span > 43< span id ="43 "> 43</ span > 44< span id ="44 "> 44</ span > 45< span id ="45 "> 45</ span > 46< span id ="46 "> 46</ span > 47< span id ="47 "> 47</ span > 48< span id ="48 "> 48</ span > 49< span id ="49 "> 49</ span > 50< span id ="50 "> 50</ span > 51< span id ="51 "> 51</ span > 52< span id ="52 "> 52</ span > 53< span id ="53 "> 53</ span > 54< span id ="54 "> 54</ span > 55< span id ="55 "> 55</ span > 56< span id ="56 "> 56</ span > 57< span id ="57 "> 57</ span > 58< span id ="58 "> 58</ span > 59< span id ="59 "> 59</ span > 60< span id ="60 "> 60</ span > 61< span id ="61 "> 61</ span > 62< span id ="62 "> 62</ span > 63< span id ="63 "> 63</ span > 64< span id ="64 "> 64</ span > 65< span id ="65 "> 65</ span > 66< span id ="66 "> 66</ span > 67< span id ="67 "> 67</ span > 68< span id ="68 "> 68</ span > 69< span id ="69 "> 69</ span > 70< span id ="70 "> 70</ span > 71< span id ="71 "> 71</ span > 72< span id ="72 "> 72</ span > 73< span id ="73 "> 73</ span > 74< span id ="74 "> 74</ span > 75< span id ="75 "> 75</ span > 76< span id ="76 "> 76</ span > 77< span id ="77 "> 77</ span > 78< span id ="78 "> 78</ span > 79< span id ="79 "> 79</ span > 80< span id ="80 "> 80</ span > 81< span id ="81 "> 81</ span > 82< span id ="82 "> 82</ span > 83< span id ="83 "> 83</ span > 84< span id ="84 "> 84</ span > 85< span id ="85 "> 85</ span > 86< span id ="86 "> 86</ span > 87< span id ="87 "> 87</ span > 88< span id ="88 "> 88</ span > 89< span id ="89 "> 89</ span > 90< span id ="90 "> 90</ span > 91< span id ="91 "> 91</ span > 92< span id ="92 "> 92</ span > 93< span id ="93 "> 93</ span > 94< span id ="94 "> 94</ span > 95< span id ="95 "> 95</ span > 96< span id ="96 "> 96</ span > 97< span id ="97 "> 97</ span > 98< span id ="98 "> 98</ span > 99< span id ="99 "> 99</ span > 100< span id ="100 "> 100</ span > 101< span id ="101 "> 101</ span > 102< span id ="102 "> 102</ span > 103< span id ="103 "> 103</ span > 104< span id ="104 "> 104</ span > 105< span id ="105 "> 105</ span > 106< span id ="106 "> 106</ span > 107< span id ="107 "> 107</ span > 108< span id ="108 "> 108</ span > 109< span id ="109 "> 109</ span > 110< span id ="110 "> 110</ span > 111< span id ="111 "> 111</ span > 112< span id ="112 "> 112</ span > 113< span id ="113 "> 113</ span > 114< span id ="114 "> 114</ span > 115< span id ="115 "> 115</ span > 116< span id ="116 "> 116</ span > 117< span id ="117 "> 117</ span > 118< span id ="118 "> 118</ span > 119< span id ="119 "> 119</ span > 120< span id ="120 "> 120</ span > 121< span id ="121 "> 121</ span > 122< span id ="122 "> 122</ span > 123< span id ="123 "> 123</ span > 124< span id ="124 "> 124</ span > 125< span id ="125 "> 125</ span > 126< span id ="126 "> 126</ span > 127< span id ="127 "> 127</ span > 128< span id ="128 "> 128</ span > 129< span id ="129 "> 129</ span > 130< span id ="130 "> 130</ span > 131< span id ="131 "> 131</ span > 132< span id ="132 "> 132</ span > 133< span id ="133 "> 133</ span > 134< span id ="134 "> 134</ span > 135< span id ="135 "> 135</ span > 136< span id ="136 "> 136</ span > 137< span id ="137 "> 137</ span > 138< span id ="138 "> 138</ span > 139< span id ="139 "> 139</ span > 140< span id ="140 "> 140</ span > 141< span id ="141 "> 141</ span > 142< span id ="142 "> 142</ span > 143< span id ="143 "> 143</ span > 144< span id ="144 "> 144</ span > 145< span id ="145 "> 145</ span > 146< span id ="146 "> 146</ span > 147< span id ="147 "> 147</ span > 148< span id ="148 "> 148</ span > 149< span id ="149 "> 149</ span > 150< span id ="150 "> 150</ span > 151< span id ="151 "> 151</ span > 152< span id ="152 "> 152</ span > 153< span id ="153 "> 153</ span > 154< span id ="154 "> 154</ span > 155< span id ="155 "> 155</ span > 156< span id ="156 "> 156</ span > 157< span id ="157 "> 157</ span > 158< span id ="158 "> 158</ span > 159< span id ="159 "> 159</ span > 160< span id ="160 "> 160</ span > 161< span id ="161 "> 161</ span > 162< span id ="162 "> 162</ span > 163< span id ="163 "> 163</ span > 164< span id ="164 "> 164</ span > 165< span id ="165 "> 165</ span > 166< span id ="166 "> 166</ span > 167< span id ="167 "> 167</ span > 168< span id ="168 "> 168</ span > 169< span id ="169 "> 169</ span > 170< span id ="170 "> 170</ span > 171< span id ="171 "> 171</ span > 172< span id ="172 "> 172</ span > 173< span id ="173 "> 173</ span > 174< span id ="174 "> 174</ span > 175< span id ="175 "> 175</ span > 176< span id ="176 "> 176</ span > 177< span id ="177 "> 177</ span > 178< span id ="178 "> 178</ span > 179< span id ="179 "> 179</ span > 180< span id ="180 "> 180</ span > 181< span id ="181 "> 181</ span > 182< span id ="182 "> 182</ span > 183< span id ="183 "> 183</ span > 184< span id ="184 "> 184</ span > 185< span id ="185 "> 185</ span > 186< span id ="186 "> 186</ span > 187< span id ="187 "> 187</ span > 188< span id ="188 "> 188</ span > 189< span id ="189 "> 189</ span > 190< span id ="190 "> 190</ span > 191< span id ="191 "> 191</ span > 192< span id ="192 "> 192</ span > 193< span id ="193 "> 193</ span > 194< span id ="194 "> 194</ span > 195< span id ="195 "> 195</ span > 196< span id ="196 "> 196</ span > 197< span id ="197 "> 197</ span > 198< span id ="198 "> 198</ span > 199< span id ="199 "> 199</ span > 200< span id ="200 "> 200</ span > 201< span id ="201 "> 201</ span > 202< span id ="202 "> 202</ span > 203</ pre >< pre class ="rust ">< code >< span class ="kw "> use super</ span > ::< span class ="kw-2 "> *</ span > ; 204 205< span class ="doccomment "> /// A trait indicating that: 206/// 207/// 1. A type has an equivalent representation to some known integral type. 208/// 2. All instances of this type fall in a fixed range of values. 209/// 3. Within that range, there are no gaps. 210/// 211/// This is generally useful for fieldless enums (aka "c-style" enums), however 212/// it's important that it only be used for those with an explicit `#[repr]`, as 213/// `#[repr(Rust)]` fieldess enums have an unspecified layout. 214/// 215/// Additionally, you shouldn't assume that all implementations are enums. Any 216/// type which meets the requirements above while following the rules under 217/// "Safety" below is valid. 218/// 219/// # Example 220/// 221/// ``` 222/// # use bytemuck::Contiguous; 223/// #[repr(u8)] 224/// #[derive(Debug, Copy, Clone, PartialEq)] 225/// enum Foo { 226/// A = 0, 227/// B = 1, 228/// C = 2, 229/// D = 3, 230/// E = 4, 231/// } 232/// unsafe impl Contiguous for Foo { 233/// type Int = u8; 234/// const MIN_VALUE: u8 = Foo::A as u8; 235/// const MAX_VALUE: u8 = Foo::E as u8; 236/// } 237/// assert_eq!(Foo::from_integer(3).unwrap(), Foo::D); 238/// assert_eq!(Foo::from_integer(8), None); 239/// assert_eq!(Foo::C.into_integer(), 2); 240/// ``` 241/// # Safety 242/// 243/// This is an unsafe trait, and incorrectly implementing it is undefined 244/// behavior. 245/// 246/// Informally, by implementing it, you're asserting that `C` is identical to 247/// the integral type `C::Int`, and that every `C` falls between `C::MIN_VALUE` 248/// and `C::MAX_VALUE` exactly once, without any gaps. 249/// 250/// Precisely, the guarantees you must uphold when implementing `Contiguous` for 251/// some type `C` are: 252/// 253/// 1. The size of `C` and `C::Int` must be the same, and neither may be a ZST. 254/// (Note: alignment is explicitly allowed to differ) 255/// 256/// 2. `C::Int` must be a primitive integer, and not a wrapper type. In the 257/// future, this may be lifted to include cases where the behavior is 258/// identical for a relevant set of traits (Ord, arithmetic, ...). 259/// 260/// 3. All `C::Int`s which are in the *inclusive* range between `C::MIN_VALUE` 261/// and `C::MAX_VALUE` are bitwise identical to unique valid instances of 262/// `C`. 263/// 264/// 4. There exist no instances of `C` such that their bitpatterns, when 265/// interpreted as instances of `C::Int`, fall outside of the `MAX_VALUE` / 266/// `MIN_VALUE` range -- It is legal for unsafe code to assume that if it 267/// gets a `C` that implements `Contiguous`, it is in the appropriate range. 268/// 269/// 5. Finally, you promise not to provide overridden implementations of 270/// `Contiguous::from_integer` and `Contiguous::into_integer`. 271/// 272/// For clarity, the following rules could be derived from the above, but are 273/// listed explicitly: 274/// 275/// - `C::MAX_VALUE` must be greater or equal to `C::MIN_VALUE` (therefore, `C` 276/// must be an inhabited type). 277/// 278/// - There exist no two values between `MIN_VALUE` and `MAX_VALUE` such that 279/// when interpreted as a `C` they are considered identical (by, say, match). 280</ span >< span class ="kw "> pub unsafe trait</ span > Contiguous: Copy +< span class ="lifetime "> 'static</ span > { 281< span class ="doccomment "> /// The primitive integer type with an identical representation to this 282 /// type. 283 /// 284 /// Contiguous is broadly intended for use with fieldless enums, and for 285 /// these the correct integer type is easy: The enum should have a 286 /// `#[repr(Int)]` or `#[repr(C)]` attribute, (if it does not, it is 287 /// *unsound* to implement `Contiguous`!). 288 /// 289 /// - For `#[repr(Int)]`, use the listed `Int`. e.g. `#[repr(u8)]` should use 290 /// `type Int = u8`. 291 /// 292 /// - For `#[repr(C)]`, use whichever type the C compiler will use to 293 /// represent the given enum. This is usually `c_int` (from `std::os::raw` 294 /// or `libc`), but it's up to you to make the determination as the 295 /// implementer of the unsafe trait. 296 /// 297 /// For precise rules, see the list under "Safety" above. 298</ span >< span class ="kw "> type</ span > Int: Copy + Ord; 299 300< span class ="doccomment "> /// The upper *inclusive* bound for valid instances of this type. 301</ span >< span class ="kw "> const</ span > MAX_VALUE:< span class ="self "> Self</ span > ::Int; 302 303< span class ="doccomment "> /// The lower *inclusive* bound for valid instances of this type. 304</ span >< span class ="kw "> const</ span > MIN_VALUE:< span class ="self "> Self</ span > ::Int; 305 306< span class ="doccomment "> /// If `value` is within the range for valid instances of this type, 307 /// returns `Some(converted_value)`, otherwise, returns `None`. 308 /// 309 /// This is a trait method so that you can write `value.into_integer()` in 310 /// your code. It is a contract of this trait that if you implement 311 /// `Contiguous` on your type you **must not** override this method. 312 /// 313 /// # Panics 314 /// 315 /// We will not panic for any correct implementation of `Contiguous`, but 316 /// *may* panic if we detect an incorrect one. 317 /// 318 /// This is undefined behavior regardless, so it could have been the nasal 319 /// demons at that point anyway ;). 320</ span >< span class ="attribute "> #[inline] 321</ span >< span class ="kw "> fn</ span > from_integer(value:< span class ="self "> Self</ span > ::Int) ->< span class ="prelude-ty "> Option</ span > << span class ="self "> Self</ span > > { 322< span class ="comment "> // Guard against an illegal implementation of Contiguous. Annoyingly we 323 // can't rely on `transmute` to do this for us (see below), but 324 // whatever, this gets compiled into nothing in release. 325</ span >< span class ="macro "> assert!</ span > (size_of::<< span class ="self "> Self</ span > >() == size_of::<< span class ="self "> Self</ span > ::Int>()); 326< span class ="kw "> if</ span >< span class ="self "> Self</ span > ::MIN_VALUE <= value && value <=< span class ="self "> Self</ span > ::MAX_VALUE { 327< span class ="comment "> // SAFETY: We've checked their bounds (and their size, even though 328 // they've sworn under the Oath Of Unsafe Rust that that already 329 // matched) so this is allowed by `Contiguous`'s unsafe contract. 330 // 331 // So, the `transmute!`. ideally we'd use transmute here, which 332 // is more obviously safe. Sadly, we can't, as these types still 333 // have unspecified sizes. 334</ span >< span class ="prelude-val "> Some</ span > (< span class ="kw "> unsafe</ span > {< span class ="macro "> transmute!</ span > (value) }) 335 }< span class ="kw "> else</ span > { 336< span class ="prelude-val "> None 337</ span > } 338 } 339 340< span class ="doccomment "> /// Perform the conversion from `C` into the underlying integral type. This 341 /// mostly exists otherwise generic code would need unsafe for the `value as 342 /// integer` 343 /// 344 /// This is a trait method so that you can write `value.into_integer()` in 345 /// your code. It is a contract of this trait that if you implement 346 /// `Contiguous` on your type you **must not** override this method. 347 /// 348 /// # Panics 349 /// 350 /// We will not panic for any correct implementation of `Contiguous`, but 351 /// *may* panic if we detect an incorrect one. 352 /// 353 /// This is undefined behavior regardless, so it could have been the nasal 354 /// demons at that point anyway ;). 355</ span >< span class ="attribute "> #[inline] 356</ span >< span class ="kw "> fn</ span > into_integer(< span class ="self "> self</ span > ) ->< span class ="self "> Self</ span > ::Int { 357< span class ="comment "> // Guard against an illegal implementation of Contiguous. Annoyingly we 358 // can't rely on `transmute` to do the size check for us (see 359 // `from_integer's comment`), but whatever, this gets compiled into 360 // nothing in release. Note that we don't check the result of cast 361</ span >< span class ="macro "> assert!</ span > (size_of::<< span class ="self "> Self</ span > >() == size_of::<< span class ="self "> Self</ span > ::Int>()); 362 363< span class ="comment "> // SAFETY: The unsafe contract requires that these have identical 364 // representations, and that the range be entirely valid. Using 365 // transmute! instead of transmute here is annoying, but is required 366 // as `Self` and `Self::Int` have unspecified sizes still. 367</ span >< span class ="kw "> unsafe</ span > {< span class ="macro "> transmute!</ span > (< span class ="self "> self</ span > ) } 368 } 369} 370 371< span class ="macro "> macro_rules!</ span > impl_contiguous { 372 ($(< span class ="macro-nonterminal "> $src</ span > :ty< span class ="kw "> as</ span >< span class ="macro-nonterminal "> $repr</ span > :ident< span class ="kw "> in</ span > [< span class ="macro-nonterminal "> $min</ span > :expr,< span class ="macro-nonterminal "> $max</ span > :expr];)< span class ="kw-2 "> *</ span > ) => {$( 373< span class ="kw "> unsafe impl</ span > Contiguous< span class ="kw "> for</ span >< span class ="macro-nonterminal "> $src</ span > { 374< span class ="kw "> type</ span > Int =< span class ="macro-nonterminal "> $repr</ span > ; 375< span class ="kw "> const</ span > MAX_VALUE:< span class ="macro-nonterminal "> $repr</ span > =< span class ="macro-nonterminal "> $max</ span > ; 376< span class ="kw "> const</ span > MIN_VALUE:< span class ="macro-nonterminal "> $repr</ span > =< span class ="macro-nonterminal "> $min</ span > ; 377 } 378 )< span class ="kw-2 "> *</ span > }; 379} 380 381< span class ="macro "> impl_contiguous!</ span > { 382 bool< span class ="kw "> as</ span > u8< span class ="kw "> in</ span > [< span class ="number "> 0</ span > ,< span class ="number "> 1</ span > ]; 383 384 u8< span class ="kw "> as</ span > u8< span class ="kw "> in</ span > [< span class ="number "> 0</ span > , u8::max_value()]; 385 u16< span class ="kw "> as</ span > u16< span class ="kw "> in</ span > [< span class ="number "> 0</ span > , u16::max_value()]; 386 u32< span class ="kw "> as</ span > u32< span class ="kw "> in</ span > [< span class ="number "> 0</ span > , u32::max_value()]; 387 u64< span class ="kw "> as</ span > u64< span class ="kw "> in</ span > [< span class ="number "> 0</ span > , u64::max_value()]; 388 u128< span class ="kw "> as</ span > u128< span class ="kw "> in</ span > [< span class ="number "> 0</ span > , u128::max_value()]; 389 usize< span class ="kw "> as</ span > usize< span class ="kw "> in</ span > [< span class ="number "> 0</ span > , usize::max_value()]; 390 391 i8< span class ="kw "> as</ span > i8< span class ="kw "> in</ span > [i8::min_value(), i8::max_value()]; 392 i16< span class ="kw "> as</ span > i16< span class ="kw "> in</ span > [i16::min_value(), i16::max_value()]; 393 i32< span class ="kw "> as</ span > i32< span class ="kw "> in</ span > [i32::min_value(), i32::max_value()]; 394 i64< span class ="kw "> as</ span > i64< span class ="kw "> in</ span > [i64::min_value(), i64::max_value()]; 395 i128< span class ="kw "> as</ span > i128< span class ="kw "> in</ span > [i128::min_value(), i128::max_value()]; 396 isize< span class ="kw "> as</ span > isize< span class ="kw "> in</ span > [isize::min_value(), isize::max_value()]; 397 398 NonZeroU8< span class ="kw "> as</ span > u8< span class ="kw "> in</ span > [< span class ="number "> 1</ span > , u8::max_value()]; 399 NonZeroU16< span class ="kw "> as</ span > u16< span class ="kw "> in</ span > [< span class ="number "> 1</ span > , u16::max_value()]; 400 NonZeroU32< span class ="kw "> as</ span > u32< span class ="kw "> in</ span > [< span class ="number "> 1</ span > , u32::max_value()]; 401 NonZeroU64< span class ="kw "> as</ span > u64< span class ="kw "> in</ span > [< span class ="number "> 1</ span > , u64::max_value()]; 402 NonZeroU128< span class ="kw "> as</ span > u128< span class ="kw "> in</ span > [< span class ="number "> 1</ span > , u128::max_value()]; 403 NonZeroUsize< span class ="kw "> as</ span > usize< span class ="kw "> in</ span > [< span class ="number "> 1</ span > , usize::max_value()]; 404} 405</ code ></ pre ></ div > 406</ section ></ div ></ main >< div id ="rustdoc-vars "data-root-path ="../../ "data-current-crate ="bytemuck "data-themes ="ayu,dark,light "data-resource-suffix =""data-rustdoc-version ="1.66.0-nightly (4a1467723 2022-09-23) "></ div ></ body ></ html >