tawasuyu/llimphi
Sovereign retained-mode GPU UI framework in Rust (wgpu+vello+taffy+parley), Elm loop, 40+ widgets.
1// Copyright 2023 the Velato Authors
2// SPDX-License-Identifier: Apache-2.0 OR MIT
3
4/// Triggered when is an issue parsing a lottie file.
5#[derive(Debug)]
6#[non_exhaustive]
7pub enum Error {
8 Json(serde_json::Error),
9}
10
11impl core::error::Error for Error {}
12impl core::fmt::Display for Error {
13 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
14 match self {
15 Self::Json(err) => write!(f, "Error parsing lottie: {err}"),
16 }
17 }
18}
19
20impl From<serde_json::Error> for Error {
21 fn from(value: serde_json::Error) -> Self {
22 Self::Json(value)
23 }
24}