Skip to content

Commit bd123b2

Browse files
committed
refactor(sacp): extract role-agnostic MatchMessage from MatchMessageFrom
- Add new MatchMessage struct for pure parsing without role awareness - MatchMessage provides if_request, if_notification, if_message methods - MatchMessageFrom now delegates parsing to MatchMessage - MatchMessageFrom applies endpoint transforms before delegating - Both types share the same fluent API pattern This separation allows simpler parsing when endpoint transforms aren't needed, while keeping role-aware matching for proxy scenarios.
1 parent 61c08e1 commit bd123b2

2 files changed

Lines changed: 278 additions & 152 deletions

File tree

src/sacp/src/util.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Types re-exported from crate root
22

33
mod typed;
4-
pub use typed::{MatchMessageFrom, TypeNotification};
4+
pub use typed::{MatchMessage, MatchMessageFrom, TypeNotification};
55

66
/// Cast from `N` to `M` by serializing/deserialization to/from JSON.
77
pub fn json_cast<N, M>(params: N) -> Result<M, crate::Error>

0 commit comments

Comments
 (0)