diff options
author | zaaarf <me@zaaarf.foo> | 2024-02-12 18:52:47 +0100 |
---|---|---|
committer | zaaarf <me@zaaarf.foo> | 2024-02-12 18:52:47 +0100 |
commit | 0a759cfc2977cee65c2acc0845b3c471c401a3d3 (patch) | |
tree | 831f0723ebdf4571988e550b8c19bd2609eb3109 /src/error.rs |
feat: initial, basic implementation
Diffstat (limited to 'src/error.rs')
-rw-r--r-- | src/error.rs | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/error.rs b/src/error.rs new file mode 100644 index 0000000..04541a5 --- /dev/null +++ b/src/error.rs @@ -0,0 +1,33 @@ +use std::result::Result as StdResult; + +use fluent::FluentResource; + +pub type Result<T> = StdResult<T, Error>; + +pub enum Error { + IoError(String) +} + +impl From<std::io::Error> for Error { + fn from(value: std::io::Error) -> Self { + todo!() + } +} + +impl From<(FluentResource, Vec<fluent_syntax::parser::ParserError>)> for Error { + fn from(value: (FluentResource, Vec<fluent_syntax::parser::ParserError>)) -> Self { + todo!() + } +} + +impl From<Vec<fluent::FluentError>> for Error { + fn from(value: Vec<fluent::FluentError>) -> Self { + todo!() + } +} + +impl From<unic_langid::LanguageIdentifierError> for Error { + fn from(value: unic_langid::LanguageIdentifierError) -> Self { + todo!() + } +} |