Skip to main content

teaql_core/
trace.rs

1#[derive(Debug, Clone, PartialEq, Eq)]
2pub struct TraceNode {
3    pub entity_type: String,
4    pub entity_id: Option<u64>,
5    pub comment: String,
6}
7
8impl TraceNode {
9    pub fn new(
10        entity_type: impl Into<String>,
11        entity_id: Option<u64>,
12        comment: impl Into<String>,
13    ) -> Self {
14        Self {
15            entity_type: entity_type.into(),
16            entity_id,
17            comment: comment.into(),
18        }
19    }
20}