diff options
| author | pml68 <contact@pml68.dev> | 2025-02-26 23:24:42 +0100 |
|---|---|---|
| committer | pml68 <contact@pml68.dev> | 2025-02-26 23:24:42 +0100 |
| commit | 21941c6de6e0843147ccab7b4045943b7a878442 (patch) | |
| tree | 535d4ae2a1182565d9db7efd19830f2e8f0ccaea /src/values.rs | |
| parent | feat: switch to personal `iced` fork, work on version info (diff) | |
| download | iced-builder-21941c6de6e0843147ccab7b4045943b7a878442.tar.gz | |
feat: rework `Value` trait, create unit tests for parser implementations
Diffstat (limited to 'src/values.rs')
| -rw-r--r-- | src/values.rs | 8 |
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; } |
