{"record":{"id":"cea808dcd3a157d6","repo":"oven-sh/bun","slug":"overflow","errorCode":null,"errorMessage":"Overflow","messagePattern":"Overflow","errorType":"error_code","errorClass":"OverflowError","httpStatus":null,"severity":"error","filePath":"src/bun_core/bounded_array.rs","lineNumber":19,"sourceCode":"//! A structure with an array and a length, that can be used as a slice.\n//!\n//! Useful to pass around small arrays whose exact size is only known at\n//! runtime, but whose maximum size is known at compile time, without requiring\n//! an `Allocator`.\n//!\n//! ```ignore\n//! let actual_size = 32;\n//! let mut a = BoundedArray::<u8, 64>::init(actual_size)?;\n//! let slice = a.slice(); // a slice of the 64-byte array\n//! let a_clone = a.clone(); // creates a copy - the structure doesn't use any internal pointers\n//! ```\n\nuse core::mem::MaybeUninit;\n\n/// `error{Overflow}`\n#[derive(thiserror::Error, strum::IntoStaticStr, Debug, Copy, Clone, Eq, PartialEq)]\npub enum OverflowError {\n    #[error(\"Overflow\")]\n    Overflow,\n}\n\n/// A structure with an array and a length, that can be used as a slice.\n///\n/// Useful to pass around small arrays whose exact size is only known at\n/// runtime, but whose maximum size is known at compile time, without requiring\n/// an `Allocator`.\npub type BoundedArray<T, const BUFFER_CAPACITY: usize> = BoundedArrayAligned<T, BUFFER_CAPACITY>;\n// The natural alignment of `[T; N]` is already `align_of::<T>()`, so the alias is\n// transparent. The explicit `alignment` const-param is dropped (see below).\n\n/// A structure with an array, length and alignment, that can be used as a\n/// slice.\n///\n/// Useful to pass around small explicitly-aligned arrays whose exact size is\n/// only known at runtime, but whose maximum size is known at compile time, without\n/// requiring an `Allocator`.","sourceCodeStart":1,"sourceCodeEnd":37,"githubUrl":"https://github.com/oven-sh/bun/blob/8c5296ac459e8252d3cd702f3fbcbb0c249d95d5/src/bun_core/bounded_array.rs#L1-L37","documentation":"Error \"Overflow\" thrown in oven-sh/bun.","triggerScenarios":"Thrown at src/bun_core/bounded_array.rs:19 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"8c5296ac459e8252d3cd702f3fbcbb0c249d95d5","analyzedAt":"2026-08-16T08:01:58.794Z","schemaVersion":2},"datasetVersion":"2026-08-16T08:17:34.114Z"}