{"record":{"id":"7c95f39c3382cc84","repo":"emilk/egui","slug":"id-must-be-non-zero","errorCode":null,"errorMessage":"Id must be non-zero.","messagePattern":"Id must be non-zero\\.","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/egui/src/id.rs","lineNumber":123,"sourceCode":"    }\n\n    /// Create a new [`Id`] from a high-entropy value. No hashing is done.\n    ///\n    /// This can be useful if you have an [`Id`] that was converted to some other type\n    /// (e.g. accesskit::NodeId) and you want to convert it back to an [`Id`].\n    ///\n    /// # Safety\n    /// You need to ensure that the value is high-entropy since it might be used in\n    /// a [`IdSet`] or [`IdMap`], which rely on the assumption that [`Id`]s have good entropy.\n    ///\n    /// The method is not unsafe in terms of memory safety.\n    ///\n    /// # Panics\n    /// If the value is zero, this will panic.\n    #[doc(hidden)]\n    #[expect(unsafe_code)]\n    pub unsafe fn from_high_entropy_bits(value: u64) -> Self {\n        Self(NonZeroU64::new(value).expect(\"Id must be non-zero.\"))\n    }\n}\n\nimpl core::fmt::Debug for Id {\n    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {\n        if *self == Self::NULL {\n            return write!(f, \"Id::NULL\");\n        }\n        #[cfg(debug_assertions)]\n        if let Some(source) = id_source::get(*self) {\n            return f.write_str(&source);\n        }\n        write!(f, \"id_{:04X}\", self.value() as u16)\n    }\n}\n\n// ----------------------------------------------------------------------------\n","sourceCodeStart":105,"sourceCodeEnd":141,"githubUrl":"https://github.com/emilk/egui/blob/d802a982ce959839d92f4f6718fdffa41143110e/crates/egui/src/id.rs#L105-L141","documentation":"Error \"Id must be non-zero.\" thrown in emilk/egui.","triggerScenarios":"Thrown at crates/egui/src/id.rs:123 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":"d802a982ce959839d92f4f6718fdffa41143110e","analyzedAt":"2026-08-16T20:07:53.954Z","schemaVersion":2},"datasetVersion":"2026-08-16T23:17:17.608Z"}