summaryrefslogtreecommitdiff
path: root/src/values.rs
diff options
context:
space:
mode:
authorpml68 <contact@pml68.dev>2025-02-26 23:24:42 +0100
committerpml68 <contact@pml68.dev>2025-02-26 23:24:42 +0100
commit21941c6de6e0843147ccab7b4045943b7a878442 (patch)
tree535d4ae2a1182565d9db7efd19830f2e8f0ccaea /src/values.rs
parentfeat: switch to personal `iced` fork, work on version info (diff)
downloadiced-builder-21941c6de6e0843147ccab7b4045943b7a878442.tar.gz
feat: rework `Value` trait, create unit tests for parser implementations
Diffstat (limited to '')
-rw-r--r--src/values.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/values.rs b/src/values.rs
index 23e47d7..e71a8c4 100644
--- a/src/values.rs
+++ b/src/values.rs
@@ -1,8 +1,12 @@
mod padding;
mod rotation;
-pub trait ValueFromStr: Sized {
+pub trait Value: Sized {
type Err;
- fn value_from_str(s: &str) -> Result<Self, Self::Err>;
+ fn from_str(s: &str) -> Result<Self, Self::Err>;
+
+ // TODO remove this once RenderedElement's options field is redone
+ #[allow(dead_code)]
+ fn to_string(&self) -> String;
}