Skip to main content

protocol_trait

Attribute Macro protocol_trait 

Source
#[protocol_trait]
Expand description

Attribute macro to add debug logging to impl blocks of Party structs.

Injects log::debug! at the start of each function, logging: <{StructName} - {PROTOCOL_INFO.name()}> {fn_name} with {session_id} over {network_info}

Network detection: IoSink/IoStream → channel info, MultipartyInterface → peer info.

Requires self.refresh() call if impl has any &self/&mut self functions.