autd3_core/link/error.rs
1use derive_more::Display;
2use thiserror::Error;
3
4#[derive(Error, Debug, Display, PartialEq, Clone)]
5#[display("{}", msg)]
6/// An error produced by the link.
7pub struct LinkError {
8 msg: String,
9}
10
11impl LinkError {
12 /// Creates a new [`LinkError`].
13 #[must_use]
14 pub fn new(msg: impl ToString) -> LinkError {
15 LinkError {
16 msg: msg.to_string(),
17 }
18 }
19}