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.
FromStr
Uuid
1 parent 2c00882 commit 92364e9Copy full SHA for 92364e9
src/uuid.rs
@@ -135,7 +135,10 @@
135
#[cfg(test)]
136
mod test;
137
138
-use std::fmt::{self, Display};
+use std::{
139
+ fmt::{self, Display},
140
+ str::FromStr,
141
+};
142
143
use crate::{
144
error::{Error, Result},
@@ -210,6 +213,14 @@ impl Default for Uuid {
210
213
}
211
214
212
215
216
+impl FromStr for Uuid {
217
+ type Err = Error;
218
+
219
+ fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
220
+ Self::parse_str(s)
221
+ }
222
+}
223
224
#[cfg(feature = "uuid-1")]
225
#[cfg_attr(docsrs, doc(cfg(feature = "uuid-1")))]
226
impl Uuid {
0 commit comments