Skip to main content

frp_domain/
error.rs

1use thiserror::Error;
2
3/// Errors produced by domain model validation logic.
4#[derive(Debug, Error)]
5pub enum DomainError {
6    /// A `BlockSchema` or `Atom` port definition was structurally invalid.
7    #[error("invalid schema: {0}")]
8    InvalidSchema(String),
9
10    /// A required port was not found.
11    #[error("missing port: {0}")]
12    MissingPort(String),
13
14    /// Two or more ports share the same name within the same direction.
15    #[error("duplicate port name: {0}")]
16    DuplicatePort(String),
17
18    /// A required field was not provided to a builder.
19    #[error("missing required field: {0}")]
20    MissingField(String),
21}