We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Error
Display
FromStrError
1 parent 5c972c7 commit 51602d1Copy full SHA for 51602d1
uefi/src/data_types/owned_strs.rs
@@ -15,6 +15,22 @@ pub enum FromStrError {
15
InteriorNul,
16
}
17
18
+impl fmt::Display for FromStrError {
19
+ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
20
+ write!(
21
+ f,
22
+ "UCS-2 Conversion Error: {}",
23
+ match self {
24
+ Self::InvalidChar => "Invalid character",
25
+ Self::InteriorNul => "Interior null terminator",
26
+ }
27
+ )
28
29
+}
30
+
31
+#[cfg(feature = "unstable")]
32
+impl core::error::Error for FromStrError {}
33
34
/// An owned UCS-2 null-terminated string.
35
///
36
/// For convenience, a [CString16] is comparable with `&str` and `String` from the standard library
0 commit comments