monospace_core/stroke.rs
1//! A stroke's name: an owned `String`, because a stroke is only a name and that name can arrive
2//! from a set loaded at runtime rather than being known at compile time.
3
4/// The name of a stroke. A stroke has no attributes of its own: it exists only because a cell or
5/// a glyph rule mentions it.
6#[derive(Debug, Clone, PartialEq, Eq, Hash)]
7pub struct Stroke(pub String);
8
9impl From<&str> for Stroke {
10 fn from(name: &str) -> Self {
11 Self(name.to_owned())
12 }
13}