vvv_engine/protocol/
notice.rs1use vvv_core::RelPath;
2
3use serde::{Deserialize, Serialize};
4
5use vvv_core::{Address, Position, ReachKind};
6
7#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
10#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
11pub struct Notice {
12 pub path: RelPath,
13 pub start: Position,
14 #[serde(flatten)]
15 pub kind: NoticeKind,
16}
17
18#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
19#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
20#[serde(tag = "kind", rename_all = "snake_case")]
21pub enum NoticeKind {
22 UnrewritableImport { import: String, replacement: String },
25 Unreachable {
29 item: String,
30 from: Address,
31 needs: ReachKind,
32 },
33 RedundantImport { import: String },
36}