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.
from_str
1 parent 2b26b50 commit 92dd3e6Copy full SHA for 92dd3e6
src/lib.rs
@@ -332,6 +332,11 @@ impl core::fmt::Display for CursorIcon {
332
impl core::str::FromStr for CursorIcon {
333
type Err = ParseError;
334
335
+ /// Parse a string slice into [`CursorIcon`].
336
+ ///
337
+ /// The `name` is a lower kebab case [`CursorIcon`] varaint name, e.g.
338
+ /// `nesw-resize`. The set of possible valid `name` values matches exactly
339
+ /// the set of [`CursorIcon::name`] outputs.
340
fn from_str(name: &str) -> Result<Self, Self::Err> {
341
match name {
342
"default" => Ok(CursorIcon::Default),
0 commit comments